A shrimp sorting optimization method and system based on biological characteristics
By constructing a shrimp biological feature database and image processing technology, and optimizing the sorting standards with clustering algorithms, the problems of low efficiency and inconsistent sorting of traditional sorting methods are solved, and efficient and accurate sorting of shrimp sorting is achieved.
Patent Information
- Application Number
- CN202410719274.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-06-05
AI Technical Summary
The traditional shrimp sorting method is inefficient and susceptible to subjective factors, and cannot meet the needs of large-scale production and high-efficiency, and cannot reasonably sort shrimp of different batches of quality, affecting the sorting quality.
Sorting method based on biological characteristics, a database is constructed by collecting biological characteristic data of shrimps, and image processing and clustering algorithms are used to identify and simulate shrimp bodies, evaluate the sorting effect, and adjust the sorting standards according to clustering results. , optimize the sorting standards.
It improves the accuracy and efficiency of shrimp sorting, meets the needs of different application scenarios, reduces artificial errors, and realizes accurate sorting of shrimps in different batches.
Smart Images

Figure CN118314407B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of shrimp sorting, and in particular to a shrimp sorting optimization method and system based on biological characteristics. Background Art
[0002] Shrimp is an important aquatic product resource, but its quality and size have a significant impact on market demand. Traditional shrimp sorting methods are mainly based on manual vision and experience judgment, which have problems such as low sorting efficiency and susceptibility to subjective factors, making it difficult to meet the needs of large-scale production and high efficiency. In addition, traditional shrimp sorting often adopts a unified shrimp sorting standard, which causes inconsistent shrimp quality in different batches, making it impossible to perform reasonable sorting, affecting the sorting quality of shrimp.
[0003] In recent years, with the development of image processing technology and machine learning algorithms, shrimp sorting technology based on biological characteristics has gradually attracted attention. This technology analyzes and identifies the biological characteristics of shrimp bodies, such as length, color and texture, and combines image processing and pattern recognition technology to achieve automatic, fast and accurate sorting of shrimp.
[0004] However, the existing shrimp sorting methods based on biological characteristics still have limitations in shrimp feature extraction, sorting standard formulation, and rationality of shrimp sorting of different quality batches. Therefore, a method is needed that can comprehensively utilize biological feature data and advanced data processing technology to sort shrimp more accurately and efficiently. In response to this demand, the present invention proposes a shrimp sorting optimization method and system based on biological characteristics, which aims to improve the accuracy and efficiency of shrimp sorting and meet the needs of different application scenarios. Summary of the invention
[0005] In order to solve at least one of the above technical problems, the present invention proposes a shrimp sorting optimization method and system based on biological characteristics.
[0006] The first aspect of the present invention provides a shrimp sorting optimization method based on biological characteristics, comprising:
[0007] Collecting shrimp biological characteristic data, and constructing a shrimp biological characteristic database according to the shrimp biological characteristic data, wherein the shrimp biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages;
[0008] Obtaining a batch of shrimp samples to be sorted, obtaining image data of the shrimp samples, performing image processing on the image data of the shrimp samples, identifying shrimps in the image data, and obtaining identification results;
[0009] According to the recognition result, current shrimp sorting standard data is obtained, and shrimp body samples are simulated and sorted according to the current shrimp sorting standard data to obtain sorting results, and the sorting integrity of the shrimp body samples and the differences of the shrimp bodies in each sorting category are judged according to the sorting results, and the shrimp sorting effect is evaluated according to the sorting integrity and the differences of the shrimp bodies in each sorting category to obtain shrimp sorting effect evaluation data;
[0010] According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering the recognition results by using a clustering algorithm to obtain a clustering result;
[0011] The current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data.
[0012] In this solution, the shrimp biological characteristic data are collected, and a shrimp biological characteristic database is constructed based on the shrimp biological characteristic data. The shrimp biological characteristic data include shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages, specifically:
[0013] Collect shrimp species data through the Internet, and obtain shrimp biological characteristic data of each species according to the shrimp species data, wherein the biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages;
[0014] Performing data preprocessing on the shrimp biological characteristic data, wherein the preprocessing includes removing outliers and classifying the data;
[0015] A shrimp biological characteristic database is established based on the data structure of the biological characteristic data, fields and data tables of the database are created, the shrimp biological characteristic data are imported into the shrimp biological characteristic database for storage, and a query index and query interface of the database are established.
[0016] In this solution, a batch of shrimp samples to be sorted are obtained, image data of the shrimp samples are obtained, image processing is performed on the image data of the shrimp samples, and shrimps in the image data are identified to obtain identification results, which are specifically:
[0017] Obtaining a preset number of shrimp samples to be sorted in a preset batch, and obtaining image data of the shrimp samples through a high-definition camera device;
[0018] A square filter window of a preset size is defined, and a noise removal operation is performed on each pixel in the image data, and the pixel that enters the noise removal operation is used as the center point pixel of the filter window, and the filter window is placed in the center point pixel, and the average value of the pixel values of the pixel points covered by the filter window is calculated, and the pixel value of the center point pixel is replaced by the average value. When all the pixel points in the image data are subjected to the noise removal operation, denoised image data is obtained;
[0019] The denoised image data is converted into a grayscale image, the gradient amplitude and direction of the grayscale image are calculated using a Sobel operator, non-maximum suppression is performed on each pixel in the gradient direction, the pixel with the largest local gradient is retained, a double threshold is used to detect strong edges and weak edges, and inconspicuous weak edges are eliminated by edge connection to obtain image edge data, the contour of the shrimp body in the image is extracted according to the image edge data to obtain contour features, and the length of the shrimp body is calculated according to the contour features;
[0020] Converting the denoised image data from the RGB color space to the HSV color space, calculating a color histogram of the denoised image data in the HSV color space, and determining color information in the shrimp body contour according to the color histogram to obtain shrimp body color information;
[0021] The image texture features of the denoised image data are described using a texture feature descriptor, the texture features of the shrimp body contour area in the denoised image data are extracted, the shrimp body texture feature data are obtained, and the shrimp body length, shrimp body color information, and shrimp body texture feature data are integrated into shrimp body morphological feature data;
[0022] The shrimp body morphological feature data is imported into the shrimp biological feature database for data matching, the similarity between the biological features of the shrimp body sample to be sorted and each shrimp in the data is determined, the shrimp with the highest similarity is taken as the matching result, and the shrimp identification result is obtained.
[0023] In this solution, the current shrimp sorting standard data is obtained according to the recognition result, and the shrimp body sample is simulated and sorted according to the current shrimp sorting standard data to obtain the sorting result, and the sorting integrity of the shrimp body sample and the difference of the shrimp bodies in each sorting category are judged according to the sorting result, and the shrimp sorting effect is evaluated according to the sorting integrity and the difference of the shrimp bodies in each sorting category to obtain the shrimp sorting effect evaluation data, which is specifically:
[0024] Obtaining current sorting standard data of the shrimp to be sorted in the target shrimp sorting equipment;
[0025] Extracting each shrimp body to be sorted in the image data separately according to the shrimp identification result, and assigning each shrimp body with the shrimp body morphological features identified in the image data, and constructing a simulation sorting model for each shrimp body;
[0026] Performing simulation sorting on the simulation sorting model of each shrimp body according to the current sorting standard data to obtain a sorting result, wherein the sorting result includes the sorted shrimps and the number of shrimp body samples of different lengths in each shrimp body length threshold range category after each shrimp is classified according to the shrimp body length threshold range set in the current sorting standard data;
[0027] Determine whether all shrimp samples to be sorted have been sorted according to the sorting results, and obtain sorting integrity data;
[0028] A quantity distribution curve is drawn for the number of shrimp bodies in each type of sorting results according to the sorting results, and the length differences of the shrimp bodies in each type of sorting results and whether different types of shrimps exist are determined. A comprehensive score is given according to the sorting integrity data, the quantity distribution curve, the length differences of the shrimp bodies in each type of sorting results and whether different types of shrimps exist, the shrimp sorting effect is evaluated, and shrimp sorting effect evaluation data is obtained.
[0029] In this solution, according to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, a clustering operation is performed on the recognition result through a clustering algorithm to obtain a clustering result, which is specifically:
[0030] According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering operation is performed on the shrimp body length of each type of shrimp in the recognition result;
[0031] The shrimp body length data is constructed into a shrimp body length matrix, K data points in the shrimp body length matrix are randomly selected as initial shrimp body length cluster centers, and for each data point in the shrimp body length matrix, the Euclidean distance of each data point to each shrimp body length cluster center is calculated, each data point is assigned to the shrimp body length cluster center with the closest Euclidean distance, and the average value of the data points of the shrimp body length cluster center after the data points are assigned is calculated, and the average value is used as the new cluster center to obtain an updated cluster center;
[0032] The updated cluster center is cyclically assigned data points and updated until the change of the cluster center is less than a preset threshold, thereby obtaining a clustering result of the body length of each shrimp.
[0033] In this solution, the current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data, specifically:
[0034] Acquire the quantity information of shrimps in each cluster in the clustering result, and determine the quantity information of shrimps in different length ranges according to the quantity information of shrimps in each cluster;
[0035] A quantity percentage threshold standard for shrimp classification is set, and the proportion data of shrimp bodies in each length range is calculated according to the quantity information. When the proportion data is less than a preset percentage, the shrimp bodies in this length range are merged with the shrimp bodies in an adjacent length range to obtain a merged length range;
[0036] Determine whether the shrimp body proportion data within the merged length range is still less than the preset percentage. If it is still less than the preset percentage, select the adjacent length range of the merged length range for merging, until the shrimp body proportion data of the merged length range is not less than the preset percentage, and obtain the length range adjustment data of the clustering data;
[0037] The shrimp length sorting range set in the current shrimp sorting standard is adjusted according to the length range data to obtain optimized shrimp classification standard data.
[0038] The second aspect of the present invention further provides a shrimp sorting optimization system based on biological characteristics, the system comprising: a memory, a processor, the memory comprising a shrimp sorting optimization method program based on biological characteristics, and when the shrimp sorting optimization method program based on biological characteristics is executed by the processor, the following steps are implemented:
[0039] Collecting shrimp biological characteristic data, and constructing a shrimp biological characteristic database according to the shrimp biological characteristic data, wherein the shrimp biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages;
[0040] Obtaining a batch of shrimp samples to be sorted, obtaining image data of the shrimp samples, performing image processing on the image data of the shrimp samples, identifying shrimps in the image data, and obtaining identification results;
[0041] According to the recognition result, current shrimp sorting standard data is obtained, and shrimp body samples are simulated and sorted according to the current shrimp sorting standard data to obtain sorting results, and the sorting integrity of the shrimp body samples and the differences of the shrimp bodies in each sorting category are judged according to the sorting results, and the shrimp sorting effect is evaluated according to the sorting integrity and the differences of the shrimp bodies in each sorting category to obtain shrimp sorting effect evaluation data;
[0042] According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering the recognition results by using a clustering algorithm to obtain a clustering result;
[0043] The current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data.
[0044] In this solution, the current shrimp sorting standard data is obtained according to the recognition result, and the shrimp body sample is simulated and sorted according to the current shrimp sorting standard data to obtain the sorting result, and the sorting integrity of the shrimp body sample and the difference of the shrimp bodies in each sorting category are judged according to the sorting result, and the shrimp sorting effect is evaluated according to the sorting integrity and the difference of the shrimp bodies in each sorting category to obtain the shrimp sorting effect evaluation data, which is specifically:
[0045] Obtaining current sorting standard data of the shrimp to be sorted in the target shrimp sorting equipment;
[0046] Extracting each shrimp body to be sorted in the image data separately according to the shrimp identification result, and assigning each shrimp body with the shrimp body morphological features identified in the image data, and constructing a simulation sorting model for each shrimp body;
[0047] Performing simulation sorting on the simulation sorting model of each shrimp body according to the current sorting standard data to obtain a sorting result, wherein the sorting result includes the sorted shrimps and the number of shrimp body samples of different lengths in each shrimp body length threshold range category after each shrimp is classified according to the shrimp body length threshold range set in the current sorting standard data;
[0048] Determine whether all shrimp samples to be sorted have been sorted according to the sorting results, and obtain sorting integrity data;
[0049] A quantity distribution curve is drawn for the number of shrimp bodies in each type of sorting results according to the sorting results, and the length differences of the shrimp bodies in each type of sorting results and whether different types of shrimps exist are determined. A comprehensive score is given according to the sorting integrity data, the quantity distribution curve, the length differences of the shrimp bodies in each type of sorting results and whether different types of shrimps exist, the shrimp sorting effect is evaluated, and shrimp sorting effect evaluation data is obtained.
[0050] In this solution, according to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, a clustering operation is performed on the recognition result through a clustering algorithm to obtain a clustering result, which is specifically:
[0051] According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering operation is performed on the shrimp body length of each type of shrimp in the recognition result;
[0052] The shrimp body length data is constructed into a shrimp body length matrix, K data points in the shrimp body length matrix are randomly selected as initial shrimp body length cluster centers, and for each data point in the shrimp body length matrix, the Euclidean distance of each data point to each shrimp body length cluster center is calculated, each data point is assigned to the shrimp body length cluster center with the closest Euclidean distance, and the average value of the data points of the shrimp body length cluster center after the data points are assigned is calculated, and the average value is used as the new cluster center to obtain an updated cluster center;
[0053] The updated cluster center is cyclically assigned data points and updated until the change of the cluster center is less than a preset threshold, thereby obtaining a clustering result of the body length of each shrimp.
[0054] In this solution, the current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data, specifically:
[0055] Acquire the quantity information of shrimps in each cluster in the clustering result, and determine the quantity information of shrimps in different length ranges according to the quantity information of shrimps in each cluster;
[0056] A quantity percentage threshold standard for shrimp classification is set, and the proportion data of shrimp bodies in each length range is calculated according to the quantity information. When the proportion data is less than a preset percentage, the shrimp bodies in this length range are merged with the shrimp bodies in an adjacent length range to obtain a merged length range;
[0057] Determine whether the shrimp body proportion data within the merged length range is still less than the preset percentage. If it is still less than the preset percentage, select the adjacent length range of the merged length range for merging, until the shrimp body proportion data of the merged length range is not less than the preset percentage, and obtain the length range adjustment data of the clustering data;
[0058] The shrimp length sorting range set in the current shrimp sorting standard is adjusted according to the length range data to obtain optimized shrimp classification standard data.
[0059] The present invention discloses a shrimp sorting optimization method and system based on biological characteristics, which are used to improve the accuracy, practicality and efficiency of shrimp sorting. First, the shrimp biological characteristic data are collected and a shrimp biological characteristic database is constructed. Then, the shrimp body samples to be sorted are identified and image processed using image processing technology, sorting standard data is obtained, and simulated sorting is performed to evaluate the sorting effect. If the effect is not good, the identification results are clustered by a clustering algorithm, the sorting standard is adjusted, and the shrimp sorting standard data is optimized. This method comprehensively considers the biological characteristics of shrimp and image recognition technology, can improve the accuracy and efficiency of shrimp sorting, and meet the shrimp sorting application scenarios with different needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 A flow chart of a shrimp sorting optimization method based on biological characteristics of the present invention is shown;
[0061] Figure 2 A flow chart of obtaining clustering results of the present invention is shown;
[0062] Figure 3 A flow chart showing the method of obtaining optimized shrimp classification standard data according to the present invention;
[0063] Figure 4 A block diagram of a shrimp sorting optimization system based on biological characteristics of the present invention is shown. DETAILED DESCRIPTION
[0064] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0065] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0066] Figure 1 A flow chart of a shrimp sorting optimization method based on biological characteristics of the present invention is shown.
[0067] like Figure 1 As shown, the first aspect of the present invention provides a shrimp sorting optimization method based on biological characteristics, comprising:
[0068] S102, collecting shrimp biological characteristic data, and constructing a shrimp biological characteristic database according to the shrimp biological characteristic data, wherein the shrimp biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages;
[0069] S104, obtaining a batch of shrimp samples to be sorted, obtaining image data of the shrimp samples, performing image processing on the image data of the shrimp samples, identifying shrimps in the image data, and obtaining identification results;
[0070] S106, obtaining current shrimp sorting standard data according to the recognition result, performing simulated sorting on shrimp samples according to the current shrimp sorting standard data to obtain sorting results, judging sorting integrity of shrimp samples and differences in shrimp bodies in each sorting category according to the sorting results, evaluating shrimp sorting effects according to the sorting integrity and differences in shrimp bodies in each sorting category, and obtaining shrimp sorting effect evaluation data;
[0071] S108, based on the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering the recognition results by using a clustering algorithm to obtain a clustering result;
[0072] S110, adjusting the current shrimp sorting standard according to the clustering result to obtain optimized shrimp classification standard data.
[0073] It should be noted that, by collecting shrimp biological characteristic data to build a shrimp biological characteristic database, image data of shrimp samples to be sorted are obtained, and the image data includes all box samples. The shrimp species to which the shrimp samples to be sorted belong are identified through image processing technology and the shrimp biological characteristic database to obtain an identification result. The shrimp species are identified by image processing technology and the constructed shrimp biological characteristic database, which can improve the recognition efficiency of shrimp. Since shrimps are transported by conveyor belts during the sorting process, the improvement of recognition efficiency can more accurately identify a large number of shrimps. Since different shrimps differ in appearance and body length, the classification standards of different shrimps are different. The shrimp sorting standard data in the identification result is obtained for simulated sorting. The simulated sorting can simulate the actual sorting of shrimps under computer conditions, and the sorting process is comprehensively evaluated and optimized before the actual operation, thereby improving the sorting efficiency and accuracy. Since the current shrimp sorting standard data is a fixed classification standard, different batches of shrimps will have different numbers of individuals. The situation is consistent, and the number of categories that the shrimp sorting equipment can sort out is limited. It is usually set within a certain range for sorting, and because all shrimp bodies need to be sorted completely, a shrimp classification standard greater than or less than a certain threshold will be set in the end to achieve complete sorting of the shrimp bodies. When a batch of shrimps just meets the shrimp classification standard greater than or less than a certain threshold, the result after sorting is equivalent to the situation of sorting; for example, when the shrimp classification standard is shrimp body length, the shrimp body length sorting categories include less than 3cm, 3-5cm, 5-8cm, 8-10cm, and greater than 10cm. When the shrimp body length of a batch is just greater than 10cm, this undoubtedly causes a waste of classification resources and no classification in the end. In order to avoid this situation, the shrimp sorting effect is evaluated according to the simulation sorting results. When the sorting effect is less than the preset value, the shrimp body length in the recognition effect is clustered by the clustering algorithm, and then the current shrimp sorting standard is adjusted according to the clustering result, thereby improving the ability of the shrimp sorting equipment to sort different batches of shrimp.
[0074] According to an embodiment of the present invention, the shrimp biological characteristic data is collected, and a shrimp biological characteristic database is constructed according to the shrimp biological characteristic data. The shrimp biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages, specifically:
[0075] Collect shrimp species data through the Internet, and obtain shrimp biological characteristic data of each species according to the shrimp species data, wherein the biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages;
[0076] Performing data preprocessing on the shrimp biological characteristic data, wherein the preprocessing includes removing outliers and classifying the data;
[0077] A shrimp biological characteristic database is established based on the data structure of the biological characteristic data, fields and data tables of the database are created, the shrimp biological characteristic data are imported into the shrimp biological characteristic database for storage, and a query index and query interface of the database are established.
[0078] It should be noted that the construction of a shrimp biological characteristic database can realize the effective management, storage and query of a large amount of shrimp biological characteristic data, provide reliable data support and technical basis for shrimp sorting optimization, and improve the recognition efficiency and accuracy for subsequent shrimp identification.
[0079] According to an embodiment of the present invention, a batch of shrimp samples to be sorted is obtained, image data of the shrimp samples is obtained, image processing is performed on the image data of the shrimp samples, shrimps in the image data are identified, and identification results are obtained, specifically:
[0080] Obtaining a preset number of shrimp samples to be sorted in a preset batch, and obtaining image data of the shrimp samples through a high-definition camera device;
[0081] A square filter window of a preset size is defined, and a noise removal operation is performed on each pixel in the image data, and the pixel that enters the noise removal operation is used as the center point pixel of the filter window, and the filter window is placed in the center point pixel, and the average value of the pixel values of the pixel points covered by the filter window is calculated, and the pixel value of the center point pixel is replaced by the average value. When all the pixel points in the image data are subjected to the noise removal operation, denoised image data is obtained;
[0082] The denoised image data is converted into a grayscale image, the gradient amplitude and direction of the grayscale image are calculated using a Sobel operator, non-maximum suppression is performed on each pixel in the gradient direction, the pixel with the largest local gradient is retained, a double threshold is used to detect strong edges and weak edges, and inconspicuous weak edges are eliminated by edge connection to obtain image edge data, the contour of the shrimp body in the image is extracted according to the image edge data to obtain contour features, and the length of the shrimp body is calculated according to the contour features;
[0083] Converting the denoised image data from the RGB color space to the HSV color space, calculating a color histogram of the denoised image data in the HSV color space, and determining color information in the shrimp body contour according to the color histogram to obtain shrimp body color information;
[0084] The image texture features of the denoised image data are described using a texture feature descriptor, the texture features of the shrimp body contour area in the denoised image data are extracted, the shrimp body texture feature data are obtained, and the shrimp body length, shrimp body color information, and shrimp body texture feature data are integrated into shrimp body morphological feature data;
[0085] The shrimp body morphological feature data is imported into the shrimp biological feature database for data matching, the similarity between the biological features of the shrimp body sample to be sorted and each shrimp in the data is determined, the shrimp with the highest similarity is taken as the matching result, and the shrimp identification result is obtained.
[0086] It should be noted that since the acquisition of image data by the camera device under the condition of electromagnetic interference will cause noise in the image data, the data quality of the image data is improved by filtering the image data; edge detection is performed by the Sobel operator, and the image edge is extracted by non-maximum suppression and double threshold detection, and then the outline of the shrimp body is determined, which can effectively identify the shape and size of the shrimp body; the image data is converted to the HSV color space, and the color histogram is calculated to determine the color information in the shrimp body outline, which is helpful to identify the color characteristics of the shrimp body; the texture feature descriptor is a mathematical representation method for describing the texture characteristics of the image, and the texture characteristics of the image data can be quickly extracted by the texture feature descriptor; by comparing the morphological feature data of the shrimp body sample to be sorted with the feature data of various shrimps in the database, the similarity score between them is calculated, which greatly improves the efficiency and accuracy of shrimp sorting. Compared with the traditional manual sorting method, this automatic sorting method based on biological characteristics can process a large number of shrimp samples more quickly and reduce the possibility of human error; the Sobel operator is an operator commonly used in image edge detection, which is used to calculate the gradient intensity and direction of the image. It is a discrete difference operator, which is used to detect areas with obvious grayscale changes in the image, and is used for edge detection and feature extraction.
[0087] According to an embodiment of the present invention, the current shrimp sorting standard data is obtained according to the recognition result, and the shrimp body sample is simulated and sorted according to the current shrimp sorting standard data to obtain the sorting result, and the sorting integrity of the shrimp body sample and the difference of the shrimp bodies in each sorting category are judged according to the sorting result, and the shrimp sorting effect is evaluated according to the sorting integrity and the difference of the shrimp bodies in each sorting category to obtain the shrimp sorting effect evaluation data, which is specifically:
[0088] Obtaining current sorting standard data of the shrimp to be sorted in the target shrimp sorting equipment;
[0089] Extracting each shrimp body to be sorted in the image data separately according to the shrimp identification result, and assigning each shrimp body with the shrimp body morphological features identified in the image data, and constructing a simulation sorting model for each shrimp body;
[0090] Performing simulation sorting on the simulation sorting model of each shrimp body according to the current sorting standard data to obtain a sorting result, wherein the sorting result includes the sorted shrimps and the number of shrimp body samples of different lengths in each shrimp body length threshold range category after each shrimp is classified according to the shrimp body length threshold range set in the current sorting standard data;
[0091] Determine whether all shrimp samples to be sorted have been sorted according to the sorting results, and obtain sorting integrity data;
[0092] A quantity distribution curve is drawn for the number of shrimp bodies in each type of sorting results according to the sorting results, and the length differences of the shrimp bodies in each type of sorting results and whether different types of shrimps exist are determined. A comprehensive score is given according to the sorting integrity data, the quantity distribution curve, the length differences of the shrimp bodies in each type of sorting results and whether different types of shrimps exist, the shrimp sorting effect is evaluated, and shrimp sorting effect evaluation data is obtained.
[0093] It should be noted that, by constructing a simulated sorting model for shrimp bodies and performing simulated sorting according to the current sorting standard data of the shrimp bodies to which the shrimp bodies belong, the simulated sorting can simulate the actual sorting process and thus obtain simulated sorting results. The simulated sorting model can predict the sorting results of the shrimp bodies before the actual sorting, which can avoid processing some unqualified shrimp bodies in actual operations, and can perform multiple tests and optimizations before the actual operation, thereby reducing the cost of the sorting process and reducing resource waste. By continuously optimizing the sorting standards, the sorting process can be made more efficient and reliable; the current sorting standard data is a standard for sorting according to the shrimp species and according to the different lengths of the shrimp bodies.
[0094] Figure 2 A flow chart of obtaining clustering results according to the present invention is shown.
[0095] According to an embodiment of the present invention, according to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, a clustering operation is performed on the recognition result through a clustering algorithm to obtain a clustering result, which is specifically:
[0096] S202, based on the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, performing a clustering operation on the shrimp body length of each type of shrimp in the recognition result;
[0097] S204, constructing the shrimp body length data into a shrimp body length matrix, randomly selecting K data points in the shrimp body length matrix as initial shrimp body length clustering centers, calculating the Euclidean distance of each data point to each shrimp body length clustering center for each data point in the shrimp body length matrix, assigning each data point to the shrimp body length clustering center with the closest Euclidean distance, calculating the average value of the data points of the shrimp body length clustering center after the data points are assigned, taking the average value as the new clustering center, and obtaining an updated clustering center;
[0098] S206, performing data point allocation and cluster center updating for the updated cluster center cycle until the change of the cluster center is less than a preset threshold, thereby obtaining a clustering result of the body length of each shrimp.
[0099] It should be noted that after evaluating the shrimp sorting effect, if the sorting effect is less than the preset value, the shrimp body length of each type of shrimp in the identification result is clustered through the clustering algorithm; the shrimp body length is clustered through the clustering algorithm, so that the shrimp bodies with shrimp body length similarity within a certain range are clustered, and the clustering algorithm avoids the subjective influence of manual classification, and can achieve more refined sorting of shrimp bodies of different lengths, thereby improving the accuracy and efficiency of sorting. The clustering results can help optimize the sorting process, so that the sorting results are more in line with the expected standards, thereby improving the sorting effect; manual classification is easily affected by individual subjective consciousness and experience level, resulting in certain differences in classification results between different personnel, and the clustering algorithm can ensure the consistency of the sorting process, so that the sorting results between different times and different operators are consistent.
[0100] Figure 3 A flow chart of obtaining optimized shrimp classification standard data according to the present invention is shown.
[0101] According to an embodiment of the present invention, the current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data, specifically:
[0102] S302, obtaining the shrimp quantity information of each cluster in the clustering result, and determining the quantity information of shrimp bodies in different length ranges according to the shrimp quantity information of each cluster;
[0103] S304, setting a quantity percentage threshold standard for shrimp classification, calculating the percentage data of shrimp bodies in each length range according to the quantity information, and when the percentage data is less than a preset percentage, merging the shrimp bodies in this length range with the shrimp bodies in an adjacent length range to obtain a merged length range;
[0104] S306, determining whether the shrimp body proportion data within the merged length range is still less than a preset percentage, and if it is still less than the preset percentage, selecting adjacent length ranges of the merged length range for merging, until the shrimp body proportion data of the merged length range is not less than the preset percentage, thereby obtaining length range adjustment data of the clustering data;
[0105] S308, adjusting the shrimp length sorting range set in the current shrimp sorting standard according to the length range data to obtain optimized shrimp classification standard data.
[0106] It should be noted that by determining the quantity information of shrimps in different length ranges based on the shrimp quantity information of each cluster in the clustering results, and then adjusting the shrimp length range based on the quantity percentage threshold standard, the sorting standard can be fine-tuned to ensure that the shrimp sorting standard is closer to the actual situation; due to the limited sorting categories of the sorting equipment, a relatively small number of shrimps may appear in a certain shrimp length range in the clustering results. This type of shrimp greatly occupies the classification space, reducing the rationality of the shrimp sorting category setting. The sorting standard is dynamically adjusted according to the actual situation, and has strong adaptability. Whether it is at different times, different scenarios, different shrimp sorting batches, or facing different types of shrimps, the corresponding standard optimization can be performed according to the real-time clustering results, thereby ensuring that the sorting process is always in the best state.
[0107] Figure 4 A block diagram of a shrimp sorting optimization system based on biological characteristics of the present invention is shown.
[0108] The second aspect of the present invention further provides a shrimp sorting optimization system 4 based on biological characteristics, the system comprising: a memory 41, a processor 42, the memory comprising a shrimp sorting optimization method program based on biological characteristics, the shrimp sorting optimization method program based on biological characteristics when executed by the processor, implements the following steps:
[0109] Collecting shrimp biological characteristic data, and constructing a shrimp biological characteristic database according to the shrimp biological characteristic data, wherein the shrimp biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages;
[0110] Obtaining a batch of shrimp samples to be sorted, obtaining image data of the shrimp samples, performing image processing on the image data of the shrimp samples, identifying shrimps in the image data, and obtaining identification results;
[0111] According to the recognition result, current shrimp sorting standard data is obtained, and shrimp body samples are simulated and sorted according to the current shrimp sorting standard data to obtain sorting results, and the sorting integrity of the shrimp body samples and the differences of the shrimp bodies in each sorting category are judged according to the sorting results, and the shrimp sorting effect is evaluated according to the sorting integrity and the differences of the shrimp bodies in each sorting category to obtain shrimp sorting effect evaluation data;
[0112] According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering the recognition results by using a clustering algorithm to obtain a clustering result;
[0113] The current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data.
[0114] According to an embodiment of the present invention, the shrimp biological characteristic data is collected, and a shrimp biological characteristic database is constructed according to the shrimp biological characteristic data. The shrimp biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages, specifically:
[0115] Collect shrimp species data through the Internet, and obtain shrimp biological characteristic data of each species according to the shrimp species data, wherein the biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages;
[0116] Performing data preprocessing on the shrimp biological characteristic data, wherein the preprocessing includes removing outliers and classifying the data;
[0117] A shrimp biological characteristic database is established based on the data structure of the biological characteristic data, fields and data tables of the database are created, the shrimp biological characteristic data are imported into the shrimp biological characteristic database for storage, and a query index and query interface of the database are established.
[0118] According to an embodiment of the present invention, a batch of shrimp samples to be sorted is obtained, image data of the shrimp samples is obtained, image processing is performed on the image data of the shrimp samples, shrimps in the image data are identified, and identification results are obtained, specifically:
[0119] Obtaining a preset number of shrimp samples to be sorted in a preset batch, and obtaining image data of the shrimp samples through a high-definition camera device;
[0120] A square filter window of a preset size is defined, and a noise removal operation is performed on each pixel in the image data, and the pixel that enters the noise removal operation is used as the center point pixel of the filter window, and the filter window is placed in the center point pixel, and the average value of the pixel values of the pixel points covered by the filter window is calculated, and the pixel value of the center point pixel is replaced by the average value. When all the pixel points in the image data are subjected to the noise removal operation, denoised image data is obtained;
[0121] The denoised image data is converted into a grayscale image, the gradient amplitude and direction of the grayscale image are calculated using a Sobel operator, non-maximum suppression is performed on each pixel in the gradient direction, the pixel with the largest local gradient is retained, a double threshold is used to detect strong edges and weak edges, and inconspicuous weak edges are eliminated by edge connection to obtain image edge data, the contour of the shrimp body in the image is extracted according to the image edge data to obtain contour features, and the length of the shrimp body is calculated according to the contour features;
[0122] Converting the denoised image data from the RGB color space to the HSV color space, calculating a color histogram of the denoised image data in the HSV color space, and determining color information in the shrimp body contour according to the color histogram to obtain shrimp body color information;
[0123] The image texture features of the denoised image data are described using a texture feature descriptor, the texture features of the shrimp body contour area in the denoised image data are extracted, the shrimp body texture feature data are obtained, and the shrimp body length, shrimp body color information, and shrimp body texture feature data are integrated into shrimp body morphological feature data;
[0124] The shrimp body morphological feature data is imported into the shrimp biological feature database for data matching, the similarity between the biological features of the shrimp body sample to be sorted and each shrimp in the data is determined, the shrimp with the highest similarity is taken as the matching result, and the shrimp identification result is obtained.
[0125] According to an embodiment of the present invention, the current shrimp sorting standard data is obtained according to the recognition result, and the shrimp body sample is simulated and sorted according to the current shrimp sorting standard data to obtain the sorting result, and the sorting integrity of the shrimp body sample and the difference of the shrimp bodies in each sorting category are judged according to the sorting result, and the shrimp sorting effect is evaluated according to the sorting integrity and the difference of the shrimp bodies in each sorting category to obtain the shrimp sorting effect evaluation data, which is specifically:
[0126] Obtaining current sorting standard data of the shrimp to be sorted in the target shrimp sorting equipment;
[0127] Extracting each shrimp body to be sorted in the image data separately according to the shrimp identification result, and assigning each shrimp body with the shrimp body morphological features identified in the image data, and constructing a simulation sorting model for each shrimp body;
[0128] Performing simulation sorting on the simulation sorting model of each shrimp body according to the current sorting standard data to obtain a sorting result, wherein the sorting result includes the sorted shrimps and the number of shrimp body samples of different lengths in each shrimp body length threshold range category after each shrimp is classified according to the shrimp body length threshold range set in the current sorting standard data;
[0129] Determine whether all shrimp samples to be sorted have been sorted according to the sorting results, and obtain sorting integrity data;
[0130] A quantity distribution curve is drawn for the number of shrimp bodies in each type of sorting results according to the sorting results, and the length differences of the shrimp bodies in each type of sorting results and whether different types of shrimps exist are determined. A comprehensive score is given according to the sorting integrity data, the quantity distribution curve, the length differences of the shrimp bodies in each type of sorting results and whether different types of shrimps exist, the shrimp sorting effect is evaluated, and shrimp sorting effect evaluation data is obtained.
[0131] According to an embodiment of the present invention, according to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, a clustering operation is performed on the recognition result through a clustering algorithm to obtain a clustering result, which is specifically:
[0132] According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering operation is performed on the shrimp body length of each type of shrimp in the recognition result;
[0133] The shrimp body length data is constructed into a shrimp body length matrix, K data points in the shrimp body length matrix are randomly selected as initial shrimp body length cluster centers, and for each data point in the shrimp body length matrix, the Euclidean distance of each data point to each shrimp body length cluster center is calculated, each data point is assigned to the shrimp body length cluster center with the closest Euclidean distance, and the average value of the data points of the shrimp body length cluster center after the data points are assigned is calculated, and the average value is used as the new cluster center to obtain an updated cluster center;
[0134] The updated cluster center is cyclically assigned data points and updated until the change of the cluster center is less than a preset threshold, thereby obtaining a clustering result of the body length of each shrimp.
[0135] According to an embodiment of the present invention, the current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data, specifically:
[0136] Acquire the quantity information of shrimps in each cluster in the clustering result, and determine the quantity information of shrimps in different length ranges according to the quantity information of shrimps in each cluster;
[0137] A quantity percentage threshold standard for shrimp classification is set, and the proportion data of shrimp bodies in each length range is calculated according to the quantity information. When the proportion data is less than a preset percentage, the shrimp bodies in this length range are merged with the shrimp bodies in an adjacent length range to obtain a merged length range;
[0138] Determine whether the shrimp body proportion data within the merged length range is still less than the preset percentage. If it is still less than the preset percentage, select the adjacent length range of the merged length range for merging, until the shrimp body proportion data of the merged length range is not less than the preset percentage, and obtain the length range adjustment data of the clustering data;
[0139] The shrimp length sorting range set in the current shrimp sorting standard is adjusted according to the length range data to obtain optimized shrimp classification standard data.
[0140] The present invention discloses a shrimp sorting optimization method and system based on biological characteristics, which are used to improve the accuracy, practicality and efficiency of shrimp sorting. First, the shrimp biological characteristic data are collected and a shrimp biological characteristic database is constructed. Then, the shrimp body samples to be sorted are identified and image processed using image processing technology, sorting standard data is obtained, and simulated sorting is performed to evaluate the sorting effect. If the effect is not good, the identification results are clustered by a clustering algorithm, the sorting standard is adjusted, and the shrimp sorting standard data is optimized. This method comprehensively considers the biological characteristics of shrimp and image recognition technology, can improve the accuracy and efficiency of shrimp sorting, and meet the shrimp sorting application scenarios with different needs.
[0141] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0142] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0143] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0144] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0145] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0146] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A shrimp sorting optimization method based on biological characteristics, characterized in that: The following steps are involved: Collecting shrimp biological characteristic data, and constructing a shrimp biological characteristic database according to the shrimp biological characteristic data, wherein the shrimp biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages; Obtaining a batch of shrimp samples to be sorted, obtaining image data of the shrimp samples, performing image processing on the image data of the shrimp samples, identifying shrimps in the image data, and obtaining identification results; According to the recognition result, current shrimp sorting standard data is obtained, and shrimp body samples are simulated and sorted according to the current shrimp sorting standard data to obtain sorting results, and the sorting integrity of the shrimp body samples and the differences of the shrimp bodies in each sorting category are judged according to the sorting results, and the shrimp sorting effect is evaluated according to the sorting integrity and the differences of the shrimp bodies in each sorting category to obtain shrimp sorting effect evaluation data; According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering the recognition results by using a clustering algorithm to obtain a clustering result; According to the clustering results, the current shrimp sorting standard is adjusted to obtain optimized shrimp classification standard data; The current shrimp sorting standard data is obtained according to the recognition result, and the shrimp body sample is simulated and sorted according to the current shrimp sorting standard data to obtain the sorting result, and the sorting integrity of the shrimp body sample and the difference of the shrimp bodies in each sorting category are judged according to the sorting result, and the shrimp sorting effect is evaluated according to the sorting integrity and the difference of the shrimp bodies in each sorting category to obtain the shrimp sorting effect evaluation data, which is specifically: Obtaining current sorting standard data of the shrimp to be sorted in the target shrimp sorting equipment; Extracting each shrimp body to be sorted in the image data separately according to the shrimp identification result, and assigning each shrimp body with the shrimp body morphological features identified in the image data, and constructing a simulation sorting model for each shrimp body; Performing simulation sorting on the simulation sorting model of each shrimp body according to the current sorting standard data to obtain a sorting result, wherein the sorting result includes the sorted shrimps and the number of shrimp body samples of different lengths in each shrimp body length threshold range category after each shrimp is classified according to the shrimp body length threshold range set in the current sorting standard data; Determine whether all shrimp samples to be sorted have been sorted according to the sorting results, and obtain sorting integrity data; According to the sorting results, a quantity distribution curve is drawn for the number of shrimp bodies in each type of sorting results, and the length difference of the shrimp bodies in each type of sorting results and whether there are different types of shrimps are determined, and a comprehensive score is given according to the sorting integrity data, the quantity distribution curve, the length difference of the shrimp bodies in each type of sorting results, and whether there are different types of shrimps, and the shrimp sorting effect is evaluated to obtain shrimp sorting effect evaluation data; According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, a clustering operation is performed on the recognition result through a clustering algorithm to obtain a clustering result, which is specifically: According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering operation is performed on the shrimp body length of each type of shrimp in the recognition result; The shrimp body length data is constructed into a shrimp body length matrix, K data points in the shrimp body length matrix are randomly selected as initial shrimp body length cluster centers, and for each data point in the shrimp body length matrix, the Euclidean distance of each data point to each shrimp body length cluster center is calculated, each data point is assigned to the shrimp body length cluster center with the closest Euclidean distance, and the average value of the data points of the shrimp body length cluster center after the data points are assigned is calculated, and the average value is used as the new cluster center to obtain an updated cluster center; Cyclic data point allocation and cluster center update for the updated cluster center until the change of the cluster center is less than a preset threshold, thereby obtaining a clustering result of the body length of each shrimp; The current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data, specifically: Acquire the quantity information of shrimps in each cluster in the clustering result, and determine the quantity information of shrimps in different length ranges according to the quantity information of shrimps in each cluster; A quantity percentage threshold standard for shrimp classification is set, and the proportion data of shrimp bodies in each length range is calculated according to the quantity information. When the proportion data is less than a preset percentage, the shrimp bodies in this length range are merged with the shrimp bodies in an adjacent length range to obtain a merged length range; Determine whether the shrimp body proportion data within the merged length range is still less than the preset percentage. If it is still less than the preset percentage, select the adjacent length range of the merged length range for merging, until the shrimp body proportion data of the merged length range is not less than the preset percentage, and obtain the length range adjustment data of the clustering data; The shrimp length sorting range set in the current shrimp sorting standard is adjusted according to the length range data to obtain optimized shrimp classification standard data.
2. The shrimp sorting optimization method based on biological characteristics according to claim 1 is characterized in that: The shrimp biological characteristic data are collected, and a shrimp biological characteristic database is constructed according to the shrimp biological characteristic data. The shrimp biological characteristic data include shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages, specifically: Collect shrimp species data through the Internet, and obtain shrimp biological characteristic data of each species according to the shrimp species data, wherein the biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages; Performing data preprocessing on the shrimp biological characteristic data, wherein the preprocessing includes removing outliers and classifying the data; A shrimp biological characteristic database is established based on the data structure of the biological characteristic data, fields and data tables of the database are created, the shrimp biological characteristic data are imported into the shrimp biological characteristic database for storage, and a query index and query interface of the database are established.
3. The shrimp sorting optimization method based on biological characteristics according to claim 1 is characterized in that: The method of obtaining a batch of shrimp samples to be sorted, obtaining image data of the shrimp samples, performing image processing on the image data of the shrimp samples, identifying the shrimps in the image data, and obtaining identification results is specifically as follows: Obtaining a preset number of shrimp samples to be sorted in a preset batch, and obtaining image data of the shrimp samples through a high-definition camera device; A square filter window of a preset size is defined, and a noise removal operation is performed on each pixel in the image data, and the pixel that enters the noise removal operation is used as the center point pixel of the filter window, and the filter window is placed in the center point pixel, and the average value of the pixel values of the pixel points covered by the filter window is calculated, and the pixel value of the center point pixel is replaced by the average value. When all the pixel points in the image data are subjected to the noise removal operation, denoised image data is obtained; The denoised image data is converted into a grayscale image, the gradient amplitude and direction of the grayscale image are calculated using a Sobel operator, non-maximum suppression is performed on each pixel in the gradient direction, the pixel with the largest local gradient is retained, a double threshold is used to detect strong edges and weak edges, and inconspicuous weak edges are eliminated by edge connection to obtain image edge data, the contour of the shrimp body in the image is extracted according to the image edge data to obtain contour features, and the length of the shrimp body is calculated according to the contour features; Converting the denoised image data from the RGB color space to the HSV color space, calculating a color histogram of the denoised image data in the HSV color space, and determining color information in the shrimp body contour according to the color histogram to obtain shrimp body color information; The image texture features of the denoised image data are described using a texture feature descriptor, the texture features of the shrimp body contour area in the denoised image data are extracted, the shrimp body texture feature data are obtained, and the shrimp body length, shrimp body color information, and shrimp body texture feature data are integrated into shrimp body morphological feature data; The shrimp body morphological feature data is imported into the shrimp biological feature database for data matching, the similarity between the biological features of the shrimp body sample to be sorted and each shrimp in the data is determined, the shrimp with the highest similarity is taken as the matching result, and the shrimp identification result is obtained.
4. A shrimp sorting optimization system based on biological characteristics, characterized in that: The shrimp sorting optimization system based on biological characteristics comprises a storage device and a processor, wherein the storage device comprises a shrimp sorting optimization method program based on biological characteristics, and when the shrimp sorting optimization method program based on biological characteristics is executed by the processor, the following steps are implemented: Collecting shrimp biological characteristic data, and constructing a shrimp biological characteristic database according to the shrimp biological characteristic data, wherein the shrimp biological characteristic data includes shrimp body length characteristics, color characteristics, and texture characteristics at different growth stages; Obtaining a batch of shrimp samples to be sorted, obtaining image data of the shrimp samples, performing image processing on the image data of the shrimp samples, identifying shrimps in the image data, and obtaining identification results; According to the recognition result, current shrimp sorting standard data is obtained, and shrimp body samples are simulated and sorted according to the current shrimp sorting standard data to obtain sorting results, and the sorting integrity of the shrimp body samples and the differences of the shrimp bodies in each sorting category are judged according to the sorting results, and the shrimp sorting effect is evaluated according to the sorting integrity and the differences of the shrimp bodies in each sorting category to obtain shrimp sorting effect evaluation data; According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering the recognition results by using a clustering algorithm to obtain a clustering result; According to the clustering results, the current shrimp sorting standard is adjusted to obtain optimized shrimp classification standard data; The current shrimp sorting standard data is obtained according to the recognition result, and the shrimp body sample is simulated and sorted according to the current shrimp sorting standard data to obtain the sorting result, and the sorting integrity of the shrimp body sample and the difference of the shrimp bodies in each sorting category are judged according to the sorting result, and the shrimp sorting effect is evaluated according to the sorting integrity and the difference of the shrimp bodies in each sorting category to obtain the shrimp sorting effect evaluation data, which is specifically: Obtaining current sorting standard data of the shrimp to be sorted in the target shrimp sorting equipment; Extracting each shrimp body to be sorted in the image data separately according to the shrimp identification result, and assigning each shrimp body with the shrimp body morphological features identified in the image data, and constructing a simulation sorting model for each shrimp body; Performing simulation sorting on the simulation sorting model of each shrimp body according to the current sorting standard data to obtain a sorting result, wherein the sorting result includes the sorted shrimps and the number of shrimp body samples of different lengths in each shrimp body length threshold range category after each shrimp is classified according to the shrimp body length threshold range set in the current sorting standard data; Determine whether all shrimp samples to be sorted have been sorted according to the sorting results, and obtain sorting integrity data; According to the sorting results, a quantity distribution curve is drawn for the number of shrimp bodies in each type of sorting results, and the length difference of the shrimp bodies in each type of sorting results and whether there are different types of shrimps are determined, and a comprehensive score is given according to the sorting integrity data, the quantity distribution curve, the length difference of the shrimp bodies in each type of sorting results, and whether there are different types of shrimps, and the shrimp sorting effect is evaluated to obtain shrimp sorting effect evaluation data; According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, a clustering operation is performed on the recognition result through a clustering algorithm to obtain a clustering result, which is specifically: According to the shrimp sorting effect evaluation data, if the sorting effect is less than a preset value, clustering operation is performed on the shrimp body length of each type of shrimp in the recognition result; The shrimp body length data is constructed into a shrimp body length matrix, K data points in the shrimp body length matrix are randomly selected as initial shrimp body length cluster centers, and for each data point in the shrimp body length matrix, the Euclidean distance of each data point to each shrimp body length cluster center is calculated, each data point is assigned to the shrimp body length cluster center with the closest Euclidean distance, and the average value of the data points of the shrimp body length cluster center after the data points are assigned is calculated, and the average value is used as the new cluster center to obtain an updated cluster center; Cyclic data point allocation and cluster center update for the updated cluster center until the change of the cluster center is less than a preset threshold, thereby obtaining a clustering result of the body length of each shrimp; The current shrimp sorting standard is adjusted according to the clustering result to obtain optimized shrimp classification standard data, specifically: Acquire the quantity information of shrimps in each cluster in the clustering result, and determine the quantity information of shrimps in different length ranges according to the quantity information of shrimps in each cluster; A quantity percentage threshold standard for shrimp classification is set, and the proportion data of shrimp bodies in each length range is calculated according to the quantity information. When the proportion data is less than a preset percentage, the shrimp bodies in this length range are merged with the shrimp bodies in an adjacent length range to obtain a merged length range; Determine whether the shrimp body proportion data within the merged length range is still less than the preset percentage. If it is still less than the preset percentage, select the adjacent length range of the merged length range for merging, until the shrimp body proportion data of the merged length range is not less than the preset percentage, and obtain the length range adjustment data of the clustering data; The shrimp length sorting range set in the current shrimp sorting standard is adjusted according to the length range data to obtain optimized shrimp classification standard data.
Citation Information
Patent Citations
Customer classification method and system and electronic equipment
CN110866782A
Intelligent supervision system for fish video recognition
CN112287913A
Fry sorting method and system, electronic equipment and storage medium
CN114612397A
Crayfish quality grading method based on neural network
CN114863198A
Underwater sonar image target segmentation method based on self-adjusting spectral clustering and entropy weight method
CN115049828A
