Growth prediction method and system based on Penaeus vannamei
Through computer vision technology, efficient and accurate measurement of shrimp morphological parameters is achieved, and the problems of low efficiency and large error in the existing technology are solved, scientific breeding plan selection and breeding management are provided, and the success rate of shrimp breeding and breeding is improved. Competitiveness.
Patent Information
- Application Number
- CN202410114043.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-27
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-01-27
AI Technical Summary
The prior art has low efficiency and large errors in the measurement of shrimp morphological parameters, and non-hand measurement methods such as bioelectric impedance method and imaging methods have not been widely used, which affects the selection of breeding schemes and data analysis.
Using a method based on computer vision technology, the shrimp body pictures are obtained, the shrimp body length is compressed, cropped, and identified, and the length is converted into weight by combining growth laws and comparison tables. The growth curve is fitted using a logical model and a Bayesian hierarchical model. Accurate measurement and prediction of shrimp body length and weight.
It improves the efficiency and accuracy of the measurement of shrimp morphological parameters, reduces artificial errors, saves manpower and material costs, provides scientific breeding plan selection, and improves breeding effect and breeding management level.
Smart Images

Figure CN117941636B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a growth prediction method based on Penaeus vannamei and a system thereof, belonging to the field of shrimps. Background Art
[0002] In the process of breeding shrimp, it is necessary to measure the shrimp to obtain the morphological parameters of the shrimp (such as cephalothorax length, weight, body length, etc.), which can be used as the basis for researchers to select breeding programs. Among them, the main method for measuring the morphological parameters of shrimp in the prior art is manual measurement, that is, the morphological parameters of shrimp are manually measured by measuring tools such as vernier calipers. This method has low work efficiency and huge workload, and the measurement results have large errors due to human factors, which seriously affects the subsequent data analysis and the selection of breeding programs. There are also some non-manual measurement methods. The bioelectrical impedance method is a method for estimating the weight of an organism by measuring its impedance to electric current. This method has the advantages of non-invasive, fast and accurate, but it requires special equipment and technical support and has not been widely used. The imaging method is a method for estimating the growth status of shrimp by capturing images of shrimp and analyzing them. This method can monitor the growth of shrimp in real time and continuously, but it requires a high level of technology and professional knowledge. At present, the application of imaging methods in shrimp growth measurement is still in the research and exploration stage. Summary of the invention
[0003] In order to overcome the defects of the prior art, the present invention provides a growth prediction method based on Penaeus vannamei. The technical solution of the present invention is:
[0004] A growth prediction method based on white shrimp, characterized in that it includes the following steps: (1) obtaining a picture of the shrimp body; (2) processing the picture; (3) identifying the length of the shrimp body based on the picture; (4) converting the identified shrimp body length into weight; (5) further converting the weight into quantity; (6) grouping the length, quantity and weight of the shrimp body for visual display.
[0005] The step (2) is specifically as follows: (2-1) compressing the obtained image:
[0006] When the photo size is larger than 2M, use the Canvas object to compress the image, load the image into memory through the Image object, create a Canvas object, call drawImage() to draw the image on the canvas, and set the image size and quality parameters;
[0007] (2-2) Crop the compressed image: Draw the compressed Canvas object onto the page as the Canvas to be cropped, create a new Canvas object to draw the cropping frame style, and listen to the touch event on the mobile terminal. According to the x, y coordinates of the finger, modify the size of the cropping frame Canvas object. After clicking OK, modify the size of the Canvas object to be cropped based on the size of the cropping frame Canvas object, and then convert it into an image.
[0008] The step (3) is specifically as follows: uploading the processed image to the server, calling the Python recognition interface, returning the shrimp length data and the recognition and annotation image, wherein each item in the returned data is the length of a shrimp in centimeters.
[0009] The step (4) is specifically as follows: (4-1) based on the growth law of white shrimp, a length-weight comparison table is obtained for length-to-weight calculation; (4-2) based on the length-weight comparison table, the length and weight are converted by interpolation calculation, and the conversion formula is as follows: Assuming that the length set of the comparison table is A, the weight set is B, and the length to be converted is a, then the converted weight b is: b=B1(a<A1);b=Bn(a> An); b = (a-Am) / (Am+1-Am)*(Bm+1-Bm)+Bm; where: Am is the first value in A that is less than a, Am+1 is the first value in A that is greater than a, and Bm is the first value in B that is less than b;
[0010] (4-3) After the conversion is completed, 200-300 measurements are performed to test the accuracy of length recognition and the accuracy of length-to-weight conversion. After testing, the average deviation of length recognition is 2%, the maximum deviation is 4%, and the minimum deviation is 0.5%; the average deviation of length-to-weight conversion is 4%, the maximum deviation is 8%, and the minimum deviation is 1%. Through measurement and testing, the control data of the length-to-weight table is corrected;
[0011] (4-4) Calculate the average length of all identified lengths for fitting the length growth curve;
[0012] (4-5) Convert all identified lengths into weights and calculate the average weight for fitting the weight growth curve.
[0013] The step (5) is specifically as follows:
[0014] (5-1) If the weight of shrimp is ag, then the number of heads is 500 / a head / jin;
[0015] (5-2) All weights were converted into head numbers, and the average head number was calculated to fit the specification growth curve.
[0016] The step (6) is specifically as follows:
[0017] (6-1) Data grouping: First, set the step size of the grouping, generate 100 data intervals according to the step size, calculate the number of data in each interval, and finally eliminate the intervals without data;
[0018] (6-2) Data filtering: Since recognition is uncontrollable, there may be recognition errors and invalid data. Abnormal data is manually filtered out and does not participate in the visualization display.
[0019] The step (6) further comprises:
[0020] (6-3) Generation of standard growth curve: The growth curve was simulated and fitted using the logistic model and Bayesian hierarchical model. The fitting formula is as follows: , where x is the independent variable time; A is the growth limit parameter; b and c are fitting parameters;
[0021] (6-4) Generation of actual growth curve: after each recognition, the recognition results are saved, and based on the saved results, an actual growth curve is generated;
[0022] (6-5) Compare the actual growth curve with the standard growth curve. When the curve offset reaches the growth warning threshold, issue a reminder, modify the feeding strategy or check the water quality and disease conditions. The growth warning judgment method is: W = (f(t2)-f(t1))-(g(t2)-g(t1)), where t1 and t2 are days, f(t) is the value of the standard growth curve at t days, and g(t) is the actual growth value at t days.
[0023] (6-6) Growth prediction: Based on the standard growth curve, the growth situation is predicted and the date when the target number of heads will be reached is predicted.
[0024] A growth prediction system based on whiteleg shrimp comprises a shrimp body picture acquisition module for acquiring shrimp body pictures; a picture processing module for processing pictures; a length recognition module for recognizing the length of the shrimp body; a weight conversion module for converting the shrimp body length to weight; a quantity conversion module for converting the shrimp body weight to quantity; and a visual display module for grouping the length, quantity and weight of the shrimp body for visual display.
[0025] The advantages of the present invention are:
[0026] Efficiently and accurately measure the morphological parameters of shrimp, and quickly and accurately obtain the morphological parameters of shrimp such as length and weight. Compared with the traditional manual measurement method, this method not only improves the measurement efficiency, but also reduces human errors and ensures the accuracy of the measurement results. This is of great significance for the measurement of morphological parameters in the shrimp farming process and helps to improve the breeding effect.
[0027] Saving manpower and material costs: In the traditional shrimp farming process, the measurement of morphological parameters usually needs to be done manually and requires the use of special measuring equipment, which is usually expensive. However, the technical solution of this application uses computer vision technology for measurement, and there is no need to purchase expensive equipment. Only a computer with computing power is needed to realize the measurement function, thereby reducing the cost of manpower and material input.
[0028] Provide strong support for the selection of shrimp breeding programs: Breeders can develop more scientific and reasonable breeding programs based on the measurement results to improve breeding results, which helps to increase the success rate of shrimp breeding and reduce breeding risks. At the same time, the breeding conditions can be adjusted in time to ensure that the shrimp grows in the best condition. This helps to improve the controllability of the shrimp breeding process and reduce breeding risks.
[0029] Better understanding of the growth status of shrimp: The technical solution of this application can convert the length data of shrimp into weight and number data, which is convenient for farmers to conduct data analysis and statistics. At the same time, this will also help improve the management level of the shrimp farming process and ensure the smooth progress of the farming process. This will help promote the development of the entire aquaculture industry and improve the competitiveness of the aquaculture industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of the system structure of the present invention.
[0031] Figure 2 This is a picture obtained after the length of the shrimp body is identified based on the picture. DETAILED DESCRIPTION
[0032] The present invention will be further described below in conjunction with specific embodiments, and the advantages and features of the present invention will become clearer as the description proceeds. However, these embodiments are exemplary only and do not constitute any limitation to the scope of the present invention. It should be understood by those skilled in the art that the details and forms of the technical solution of the present invention may be modified or replaced without departing from the spirit and scope of the present invention, but these modifications and replacements all fall within the scope of protection of the present invention.
[0033] See also Figure 1 and Figure 2 The present invention relates to a growth prediction method based on white shrimp, comprising the following steps: (1) obtaining a picture of the shrimp body, calling the camera or album authority of a mobile phone, taking a picture or uploading an identification picture from the album; (2) processing the picture; (3) identifying the length of the shrimp body based on the picture; (4) converting the identified shrimp body length into weight; (5) further converting the weight into quantity; (6) grouping the length, quantity and weight of the shrimp body for visual display.
[0034] The step (2) is specifically as follows:
[0035] (2-1) Compress the obtained image:
[0036] When the photo size is larger than 2M, use the Canvas object to compress the image, load the image into memory through the Image object, create a Canvas object, call drawImage() to draw the image on the canvas, and set the image size and quality parameters;
[0037] (2-2) Crop the compressed image:
[0038] Draw the compressed Canvas object onto the page as the Canvas to be cropped, create a new Canvas object to draw the cropping frame style, and listen to the touch event on the mobile terminal. Modify the size of the cropping frame Canvas object according to the x, y coordinates of the finger. After clicking OK, modify the size of the Canvas object to be cropped based on the size of the cropping frame Canvas object, and then convert it into a picture.
[0039] The step (3) is specifically as follows: uploading the processed image to the server, calling the Python recognition interface, returning the shrimp length data and the recognition and annotation image, wherein each item in the returned data is the length of a shrimp in centimeters.
[0040] The step (4) is specifically as follows:
[0041] (4-1) Based on the growth pattern of white shrimp, a length-weight comparison table was obtained for the calculation of length-to-weight conversion, as shown in Table 1:
[0042]
[0043]
[0044] Table 1
[0045] (4-2) Based on the length-weight comparison table, the length and weight are converted through interpolation calculation. The conversion formula is as follows:
[0046] Assuming that the length set of the comparison table is A, the weight set is B, and the length to be converted is a, the converted weight b is:
[0047] b=B1(a<A1);b=Bn(a> An);
[0048] b=(a-Am) / (Am+1-Am)*(Bm+1-Bm)+Bm;
[0049] Among them: Am is the first value in A that is less than a, Am+1 is the first value in A that is greater than a, and Bm is the first value in B that is less than b; for example: when the length is 9.8cm, by looking up the length-weight comparison table, Am=9.6cm, Am+1=10.2cm, Bm=7.25g, Bm+1=8.5g, then the corresponding weight b=(9.8-9.6) / (10.2-9.6)*(8.5-7.25)+7.25=7.67g.
[0050] (4-3) After the conversion is completed, 200-300 measurements are performed to test the accuracy of length recognition and the accuracy of length-to-weight conversion. After testing, the average deviation of length recognition is 2%, the maximum deviation is 4%, and the minimum deviation is 0.5%; the average deviation of length-to-weight conversion is 4%, the maximum deviation is 8%, and the minimum deviation is 1%. Through measurement and testing, the control data of the length-to-weight table is corrected;
[0051] (4-4) Calculate the average length of all identified lengths for fitting the length growth curve; (4-5) Convert all identified lengths into weights and calculate the average weight for fitting the weight growth curve.
[0052] The step (5) is specifically as follows:
[0053] (5-1) If the weight of shrimp is ag, then the number of heads is 500 / a head / jin;
[0054] (5-2) All weights were converted into head numbers, and the average head number was calculated to fit the specification growth curve.
[0055] The step (6) is specifically as follows:
[0056] (6-1) Data grouping: First, set the step size of the grouping, generate 100 data intervals according to the step size, calculate the number of data in each interval, and finally remove the intervals without data;
[0057] (6-2) Data filtering: Since recognition is uncontrollable, there may be recognition errors and invalid data. Abnormal data is manually filtered out and does not participate in the visualization display.
[0058] The step (6) further comprises:
[0059] (6-3) Generation of standard growth curve: The growth curve was simulated and fitted using the logistic model and Bayesian hierarchical model. The fitting formula is as follows: , where x is the independent variable time; A is the growth limit parameter; b and c are fitting parameters;
[0060] (6-4) Generation of actual growth curve: after each recognition, the recognition results are saved, and based on the saved results, an actual growth curve is generated;
[0061] (6-5) Compare the actual growth curve with the standard growth curve. When the growth curve reaches the growth warning threshold, issue a reminder, modify the feeding strategy, or check the water quality and disease conditions. The judgment method for growth warning is: W = (f(t2)-f(t1))-(g(t2)-g(t1)), where t1 and t2 are days, f(t) is the value of the standard growth curve at t days, and g(t) is the actual growth value at t days.
[0062] (6-6) Growth prediction: Based on the standard growth curve, the growth situation is predicted and the date when the target number of heads will be reached is predicted.
[0063] The present invention also relates to a growth prediction system based on Penaeus vannamei, comprising:
[0064] The shrimp body image acquisition module 1 is used to acquire the shrimp body image; the image processing module 2 is used to process the image; the length recognition module 3 is used to recognize the length of the shrimp body; the weight conversion module 4 is used to convert the shrimp body length to weight; the quantity conversion module 5 is used to convert the shrimp body weight to quantity; the visualization display module 6 is used to group the shrimp body length, quantity and weight for visualization display.
[0065] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0066] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0067] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0069] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0070] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0071] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A growth prediction method based on Penaeus vannamei, characterized in that: The following steps are involved: (1) Obtaining a picture of the shrimp body; (2) Process the image. The steps are as follows: (2-1) Compress the obtained image: When the photo size is greater than 2M, use the Canvas object to compress the image, load the image into memory through the Image object, create a Canvas canvas object, call drawImage() to draw the image on the canvas, and set the image size and quality parameters; (2-2) Crop the compressed image: Draw the compressed Canvas object onto the page as the Canvas to be cropped, create a new Canvas object to draw the cropping frame style, and listen to the touch event on the mobile terminal. According to the x, y coordinates of the finger, modify the size of the cropping frame Canvas object. After clicking OK, modify the size of the Canvas object to be cropped based on the size of the cropping frame Canvas object, and then convert it into an image. (3) Identify the length of the shrimp based on the image. The steps are as follows: upload the processed image to the server, call the Python recognition interface, identify the labeled image and return the data of the shrimp length. Each item in the returned data is the length of a shrimp in centimeters; (4) Based on the identified shrimp body length, convert it to weight. The steps are as follows: (4-1) Based on the growth pattern of white shrimp, a length-weight comparison table is obtained for the calculation of length-to-weight conversion; (4-2) Based on the length-weight comparison table, the length and weight are converted through interpolation calculation. The conversion formula is as follows: Assuming that the length set of the comparison table is A, the weight set is B, and the length to be converted is a, the converted weight b is: When a < A1, b = B1; when a > A n , b = B n ; A1≤a≤A n When, b = (aA m ) / (A m+1 -A m ) * (B m+1 -B m ) + B m ; Among them: A m is the first value in A that is less than a, A m+1 is the first value in A that is greater than a, B m is the first value in B that is less than b; B m+1 is the first value in B that is greater than b; (4-3) After the conversion is completed, 200-300 measurements are performed to test the accuracy of length recognition and the accuracy of length-to-weight conversion. After testing, the average deviation of length recognition is 2%, the maximum deviation is 4%, and the minimum deviation is 0.5%; the average deviation of length-to-weight conversion is 4%, the maximum deviation is 8%, and the minimum deviation is 1%. Through measurement and testing, the comparison data of the length-to-weight comparison table is corrected; (4-4) Calculate the average length of all identified lengths for fitting the length growth curve; (4-5) Convert all identified lengths into weights and calculate the average weight for fitting the weight growth curve; (5) Continue to convert weight to quantity as follows: (5-1) If the weight of shrimp is ag, then the number of heads is 500 / a head / jin; (5-2) Convert all weights into head numbers and calculate the average head number for fitting the specification growth curve; (6) Group the length, number and weight of the shrimp and display them visually. The steps are as follows: (6-1) Data grouping: First, set the step size of the grouping, generate 100 data intervals according to the step size, calculate the number of data in each interval, and finally eliminate the intervals without data; (6-2) Data filtering: Since recognition is uncontrollable, there may be recognition errors and invalid data. Abnormal data is manually filtered out and does not participate in the visualization display; (6-3) Generation of standard growth curve: The growth curve was simulated and fitted using the logistic model and Bayesian hierarchical model. The fitting formula is as follows: ; Among them, x is the independent variable time; A is the growth limit parameter; b and c are fitting parameters; (6-4) Generation of actual growth curve: after each recognition, the recognition results are saved, and based on the saved results, the actual growth curve is generated; (6-5) Compare the actual growth curve with the standard growth curve. When the curve offset reaches the growth warning threshold, a reminder is issued to modify the feeding strategy or check the water quality and disease conditions. The judgment method for growth warning is: ; Where t1 and t2 are days, f(t) is the value of the standard growth curve at day t, and g(t) is the actual growth value at day t; (6-6) Growth prediction: Based on the standard growth curve, the growth situation is predicted and the date when the target number of heads will be reached is predicted.
2. A growth prediction system for Penaeus vannamei based on the growth prediction method according to claim 1, characterized in that: include A shrimp body image acquisition module is used to acquire shrimp body images; Image processing module, used for processing images; Length recognition module, used to identify the length of the shrimp body; A weight conversion module, used to convert shrimp body length to weight; A quantity conversion module is used to convert the weight of shrimp into quantity; The visual display module is used to group the length, quantity and weight of shrimp bodies for visual display.
Citation Information
Patent Citations
Weighing system used for aquaculture breeding screening
CN110274673A
Penaeus vannamei image rapid detection method based on improved LeNet network
CN115019088A