A fish sorting method and device, electronic equipment and storage medium
Through the automated sorting method of fish body integrity recognition and mode switching, the problem of low efficiency in manual assessment of fish integrity is solved, and efficient and accurate fish sorting is achieved.
Patent Information
- Application Number
- CN202310458637.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-04-17
AI Technical Summary
Existing fish sorting relies on manual assessment of fish integrity, which is inefficient and highly subjective, and cannot be quantitatively analyzed, resulting in insufficient sorting accuracy and efficiency.
By identifying the integrity of the fish on the sorting line, using image recognition technology to obtain the fish body features and fin features, switching the sorting mode according to the identification results, and using different sorting modes to deal with different fish integrity identification results, automated sorting is achieved.
It improves the efficiency and accuracy of fish sorting, avoids errors caused by manual assessment, and enables flexible sorting mode switching to adapt to different fish integrity scenarios.
Smart Images

Figure CN116671546B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart fishery technology, and in particular to a fish catch sorting method, device, electronic equipment and storage medium. Background Art
[0002] When it comes to fish sorting, the integrity of the fish is assessed by the staff's senses before sorting. Traditional sensory evaluation relies mainly on the staff's personal experience, which is highly subjective. The evaluation process cannot be quantitatively analyzed. In addition, the staff needs to be highly focused on the sorting line. In the more rigorous evaluation, some small damages need to be carefully checked, resulting in low sorting efficiency. Summary of the Invention
[0003] Embodiments of the present invention provide a fish sorting method designed to address the problem of low sorting efficiency caused by the need for manual fish integrity assessment during existing fish sorting. By identifying the integrity of fish on a sorting line and sorting them based on the integrity identification results, manual fish integrity assessment is no longer required, improving sorting efficiency. Sorting is performed using different sorting modes, which are switched based on the fish integrity identification results. Different sorting modes can be used to address sorting scenarios with different fish integrity identification results. Flexible switching of sorting modes can avoid the continued occurrence of sorting errors, thereby improving the accuracy of fish sorting.
[0004] In a first aspect, an embodiment of the present invention provides a method for sorting fish catches, the method comprising:
[0005] Performing integrity identification on fish bodies on a sorting line in a first sorting mode to obtain a first fish body integrity identification result, wherein the first sorting mode corresponds to a first integrity curve, and the first sorting mode performs sorting based on the first fish body integrity identification result;
[0006] If the first fish body integrity recognition result within the first preset time does not conform to the first integrity curve, determining a second integrity curve according to the first fish body integrity recognition result within the first preset time;
[0007] A second sorting mode is determined according to the second integrity curve, and integrity identification is performed on the fish bodies on the sorting line in the second sorting mode to obtain a second fish body integrity identification result. The second sorting mode performs sorting based on the second fish body integrity identification result.
[0008] Optionally, performing integrity identification on the fish bodies on the sorting line in the first sorting mode to obtain a first fish body integrity identification result includes:
[0009] Acquiring fish body images on the sorting line;
[0010] Performing feature extraction processing on the fish body image to obtain fish body features and fish fin features;
[0011] A first fish body integrity recognition result is determined based on the fish body features and the fish fin features.
[0012] Optionally, after performing integrity identification on the fish bodies on the sorting line in the first sorting mode and obtaining a first fish body integrity identification result, the method further includes:
[0013] Obtaining the first fish body integrity recognition result within a first preset time;
[0014] Determining the integrity mean and integrity standard deviation within the first preset time based on the first fish body integrity recognition result within the first preset time;
[0015] According to the integrity mean and the integrity standard deviation, it is determined whether the first fish body integrity recognition result within a first preset time obeys a first integrity curve.
[0016] Optionally, determining a second integrity curve according to the first fish body integrity recognition result within a first preset time includes:
[0017] A second integrity curve within the first preset time is determined according to the first fish body integrity recognition result, the integrity mean and the integrity standard deviation within the first preset time.
[0018] Optionally, each sorting mode corresponds to a third integrity curve, and determining the second sorting mode according to the second integrity curve includes:
[0019] calculating a degree of fit between the second integrity curve and each third integrity curve;
[0020] Determining a third integrity curve having a fitting degree greater than a preset fitting degree as a candidate curve;
[0021] The candidate curve with the highest fitting degree is selected as the first target curve, and the second sorting mode is determined according to the sorting mode corresponding to the first target curve.
[0022] Optionally, after calculating the degree of fit between the second integrity curve and each third integrity curve, the method further includes:
[0023] If there is no third integrity curve with a fitting degree greater than the preset fitting degree, obtaining the third integrity curve with the highest fitting degree as the second target curve;
[0024] determining a corresponding candidate sorting mode according to the sorting mode corresponding to the second target curve, and fitting the second integrity curve to the second target curve to obtain a fitting curve;
[0025] The candidate sorting mode is fine-tuned using the fitting curve to obtain a third sorting mode, and the integrity of the fish bodies on the sorting line is identified under the third sorting mode to obtain a third fish body integrity identification result. The third sorting mode performs sorting based on the third fish body integrity identification result.
[0026] Optionally, after obtaining the third sorting mode, the method further includes:
[0027] Obtaining the third fish body integrity recognition result within a second preset time;
[0028] Performing reinforcement learning on the third sorting mode according to the third fish body integrity recognition result within the second preset time to obtain the third sorting mode after reinforcement learning;
[0029] The third sorting pattern after reinforcement learning is associated with the second integrity curve and saved, so that the third sorting pattern after reinforcement learning can replace the first sorting pattern.
[0030] In a second aspect, an embodiment of the present invention further provides a fish catch sorting device, the fish catch sorting device comprising:
[0031] an identification module, configured to perform integrity identification on fish on the sorting line in a first sorting mode to obtain a first fish integrity identification result, wherein the first sorting mode corresponds to a first integrity curve, and the first sorting mode performs sorting based on the first fish integrity identification result;
[0032] a first determining module, configured to determine a second integrity curve based on the first fish body integrity recognition result within the first preset time if the first fish body integrity recognition result within the first preset time does not conform to the first integrity curve;
[0033] The first processing module is configured to determine a second sorting mode based on the second integrity curve, and perform integrity identification on the fish on the sorting line in the second sorting mode to obtain a second fish integrity identification result, wherein the second sorting mode performs sorting based on the second fish integrity identification result.
[0034] In a third aspect, an embodiment of the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the fish sorting method provided in the embodiment of the present invention are implemented.
[0035] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the fish catch sorting method provided in the embodiment of the invention are implemented.
[0036] In an embodiment of the present invention, in a first sorting mode, integrity identification is performed on fish bodies on a sorting line to obtain a first fish body integrity identification result. The first sorting mode corresponds to a first integrity curve, and sorting is performed in the first sorting mode based on the first fish body integrity identification result. If the first fish body integrity identification result within a first preset time does not comply with the first integrity curve, a second integrity curve is determined based on the first fish body integrity identification result within the first preset time. A second sorting mode is determined based on the second integrity curve, and in the second sorting mode, integrity identification is performed on fish bodies on the sorting line to obtain a second fish body integrity identification result. Sorting is performed in the second sorting mode based on the second fish body integrity identification result. By identifying the integrity of fish bodies on the sorting line and sorting them according to the integrity identification results, there is no need for manual assessment of the integrity of the fish, which can improve the sorting efficiency. Sorting is carried out through different sorting modes, and the sorting mode is switched according to the fish body integrity identification results. Different sorting modes can be used to cope with sorting scenarios under different fish body integrity identification results. By flexibly switching the sorting mode, the continuous generation of sorting errors can be avoided, and the accuracy of fish catch sorting can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 This is a flow chart of a fish catch sorting method provided by an embodiment of the present invention;
[0039] Figure 2 1 is a schematic structural diagram of a fish catch sorting device provided in an embodiment of the present invention;
[0040] Figure 3 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0042] like Figure 1 As shown, Figure 1 This is a flow chart of a method for sorting fish catches provided by an embodiment of the present invention. The method for sorting fish catches includes the following steps:
[0043] 101. Perform integrity identification on fish bodies on a sorting line in a first sorting mode to obtain a first fish body integrity identification result.
[0044] In an embodiment of the present invention, the aforementioned fish sorting method can be applied to a fish sorting system comprising an image acquisition device, a host computer, a sorting line, and a sorting robot arm. The fish sorting system has multiple sorting modes, wherein at least one of the following: the image acquisition device's capture parameters, the sorting line's transport speed, the sorting robot arm's control parameters, and the integrity recognition algorithm may differ between the different sorting modes.
[0045] The above-mentioned sorting line can be an automatic sorting assembly line. The above-mentioned sorting line performs sorting according to the fish body integrity recognition result. The above-mentioned fish body integrity recognition result includes a fish body integrity score. When the fish body integrity score is greater than a preset value, the corresponding fish body will be sorted as a complete fish body. The specific sorting work can be performed by a sorting robot arm. Specifically, an image acquisition device is provided on the sorting line. The above-mentioned image acquisition device can be a camera module, an industrial camera, etc. The sorting line carries the fish body through the acquisition area of the image acquisition device at a certain speed, and the image acquisition device is used to capture the image of the fish body in the acquisition area to obtain the image to be identified of each fish body. After obtaining the image to be identified, the image to be identified can be subjected to image recognition by the image acquisition device or the image recognition algorithm in the host computer to obtain the fish body integrity score in the image to be identified.
[0046] The above-mentioned image recognition algorithm can be an image recognition model based on a convolutional neural network, such as an R-CNN network, a Faster R-CNN network, a YOLO network, or other convolutional neural network model. After the image to be recognized is input into a trained image recognition model, the trained image recognition model performs image recognition processing on the image to be recognized and outputs a corresponding fish integrity score. The higher the fish integrity score, the more complete the corresponding fish. A large number of sample fish images can be labeled with integrity, so that each sample fish image corresponds to a integrity label. The sample fish images are input into the trained image recognition model for processing to obtain integrity recognition results for the sample fish images. The error loss between the integrity recognition results of the sample fish images and the integrity labels of the sample fish images is calculated as a loss function. With minimizing the error loss as the optimization goal, the parameters of the trained image recognition model are adjusted using a backpropagation algorithm. The above training process is iterated, and the parameters are continuously adjusted until the loss function converges to the minimum error loss or the number of iterations reaches a preset number, thereby terminating the training and obtaining a trained image recognition model. The trained image recognition model can be deployed in an image acquisition device or a host computer, which can be a local host or a server.
[0047] Of course, in some possible embodiments, after obtaining the image to be identified, the fish body image in the image to be identified can be extracted and the similarity calculated with the standard fish body image, and the similarity value can be used as the fish body integrity. The higher the similarity between the fish body image and the standard fish body image, the more complete the corresponding fish body. The above-mentioned standard fish body image can be uploaded by relevant personnel. Furthermore, the feature values of the standard fish body image can be extracted in advance and stored. When the fish body image is obtained, the feature values of the fish body image are extracted, and the feature values of the extracted fish body image are calculated with the feature values of the stored standard fish body image to obtain the similarity between the fish body image and the standard fish body image.
[0048] Each sorting model corresponds to a completeness curve. The first sorting mode corresponds to a first completeness curve. The first sorting mode performs sorting based on the first fish completeness identification result. The first sorting mode can be the default sorting mode, or the currently running sorting mode of the catch sorting system. Any other non-running sorting modes can be referred to as second sorting modes.
[0049] The completeness curve is a fish body completeness curve, which can be obtained by the distribution of the fish body completeness scores in one or more batches. It can be understood that the number of fish body completeness scores in a certain fish body completeness score region is much larger than that in other fish body completeness score regions, for example, the number of fish body completeness scores in the range of 0.7 to 0.9 is much larger than that in the range of 0 to 0.7 and 0.9 to 1.0. Therefore, the fish body completeness scores of the fish bodies in one or more batches can conform to a certain completeness curve, that is, subject to a certain completeness curve. The horizontal axis of the completeness curve is the completeness score, and the vertical axis is the number. The more samples of fish body completeness scores, the more the number of fish body completeness scores that are the average completeness scores, so that the completeness curve conforms to the Gaussian distribution in the local region.
[0050] In the first sorting mode, the fish bodies are sorted by the first fish body completeness recognition result. When the fish body completeness score is greater than a preset value, the corresponding fish body is sorted as a complete fish body. Further, in the first sorting mode, before the first preset time is reached, the fish bodies can be sorted by the first fish body completeness recognition result. When the fish body completeness score is greater than a preset value, the corresponding fish body is sorted as a complete fish body. When the first preset time is reached, it is determined whether the first fish body completeness recognition result in the first preset time conforms to the first completeness curve. If the first fish body completeness recognition result in the first preset time conforms to the first completeness curve, when the fish body completeness score is greater than a preset value, the corresponding fish body is sorted as a complete fish body.
[0051] 102、If the first fish body completeness recognition result in the first preset time does not conform to the first completeness curve, a second completeness curve is determined according to the first fish body completeness recognition result in the first preset time.
[0052] In the embodiment of the application, the first preset time can be a time period set by a person, a time period determined according to the conveying speed of the sorting line, or a time period determined according to the conveying of a preset number of fish bodies.
[0053] The first fish body completeness recognition result is used to represent the fish body completeness score recognized in the first sorting mode. The first fish body completeness recognition result in the first preset time can be represented by a set.
[0054] If the first fish integrity recognition results within the first preset time do not conform to the first integrity curve, this indicates that the fish integrity score distribution of the current batch differs from the fish integrity score distribution in the first integrity curve. Since the first sorting mode is designed based on the first integrity curve, if the fish integrity score distribution of the current batch differs from the fish integrity score distribution in the first integrity curve, continuing to use the first sorting mode may result in a mismatch between efficiency and accuracy. For example, if the fish integrity score distribution of the current batch is concentrated in a higher fish integrity score region compared to the first integrity curve, this indicates that the fish quality of the current batch is high. The speed of fish integrity recognition and fish sorting can be increased to improve sorting efficiency. For another example, if the fish integrity score distribution of the current batch is concentrated in a lower fish integrity score region compared to the first integrity curve, this indicates that the fish quality of the current batch is poor. The speed of fish integrity recognition can be reduced to improve fish integrity recognition accuracy, while also reducing the sorting speed, thereby improving sorting accuracy.
[0055] When the first fish body integrity recognition result within the first preset time does not obey the first integrity curve, it indicates that the first sorting mode is no longer suitable for the current batch of fish body sorting scenario. Therefore, it is necessary to switch to the second sorting mode to adapt to the current batch of fish body sorting scenario.
[0056] Specifically, the above-mentioned second integrity curve is constructed based on the first fish body integrity recognition result within the first preset time, with the fish body integrity score as the horizontal axis and the quantity as the vertical axis. The above-mentioned second integrity curve is the distribution of the fish body integrity scores of a part of the current batch. The above-mentioned second integrity curve can represent the distribution of the fish body integrity scores of the current batch to a certain extent.
[0057] Of course, existing data processing software such as Origin and MATLAB can also be used to process the first fish body integrity recognition result within the first preset time to obtain a second integrity curve corresponding to the first fish body integrity recognition result within the first preset time.
[0058] 103. Determine a second sorting mode according to the second integrity curve, and perform integrity identification on the fish bodies on the sorting line under the second sorting mode to obtain a second fish body integrity identification result.
[0059] In an embodiment of the present invention, the second sorting mode is a non-default sorting mode, and the second sorting mode is a sorting mode that replaces the first sorting mode. When the first sorting mode is not suitable for the current batch of fish sorting scenario, the sorting mode can be switched to the second sorting mode to sort the current batch of fish. The first sorting mode and the second sorting mode differ in at least one of the following: the shooting parameters of the image acquisition device, the carrying speed of the sorting line, the control parameters of the sorting robot arm, and the integrity recognition algorithm. Specifically, each sorting mode has its corresponding integrity curve, and different sorting modes are suitable for fish sorting scenarios with different integrity score distributions. Different sorting modes have their own corresponding shooting parameters of the image acquisition device, the carrying speed of the sorting line, the control parameters of the sorting robot arm, and the integrity recognition algorithm.
[0060] After obtaining the second integrity curve, the similarity between the second integrity curve and the integrity curves corresponding to the various sorting modes may be calculated, and the sorting mode corresponding to the integrity curve with the greatest similarity is taken as the second sorting mode.
[0061] Alternatively, the mean and standard deviation of the second integrity curve are extracted as the eigenvector of the second integrity curve, the mean and standard deviation of the integrity curve corresponding to each sorting mode are extracted as the eigenvector corresponding to each sorting mode, the vector angle between the eigenvector of the second integrity curve and the eigenvector corresponding to each sorting mode is calculated, and the sorting mode with the smallest vector angle is selected as the second sorting mode.
[0062] After determining the second sorting mode, the first sorting mode is switched to the second sorting mode. In the second sorting mode, the fish on the sorting line are identified for integrity, thereby obtaining a second fish integrity identification result. The second fish integrity identification result represents the fish integrity score identified in the second sorting mode.
[0063] Of course, it should be noted that when the fish sorting system operates in the second sorting mode, it will continue to determine whether it is necessary to switch to a new sorting mode according to the above steps 101 and 102, so that the fish sorting system can adapt to different fish sorting scenarios and obtain the optimal choice in speed and accuracy for sorting batches of different fish qualities.
[0064] In an embodiment of the present invention, in a first sorting mode, integrity identification is performed on fish bodies on a sorting line to obtain a first fish body integrity identification result. The first sorting mode corresponds to a first integrity curve, and the first sorting mode performs sorting based on the first fish body integrity identification result. If the first fish body integrity identification result within a first preset time does not comply with the first integrity curve, a second integrity curve is determined based on the first fish body integrity identification result within the first preset time. A second sorting mode is determined based on the second integrity curve, and in the second sorting mode, integrity identification is performed on fish bodies on the sorting line to obtain a second fish body integrity identification result. The second sorting mode performs sorting based on the second fish body integrity identification result. By identifying the integrity of fish bodies on the sorting line and sorting them according to the integrity identification results, there is no need for manual assessment of the integrity of the fish, which can improve the sorting efficiency. Sorting is carried out through different sorting modes, and the sorting mode is switched according to the fish body integrity identification results. Different sorting modes can be used to cope with sorting scenarios under different fish body integrity identification results. By flexibly switching the sorting mode, the continuous generation of sorting errors can be avoided, and the accuracy of fish catch sorting can be improved.
[0065] It is understandable that in the specific implementation of this application, image data and equipment data within the factory are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0066] Optionally, in the step of performing integrity identification on the fish bodies on the sorting line in the first sorting mode to obtain a first fish body integrity identification result, an image of the fish body on the sorting line can be obtained; feature extraction processing is performed on the fish body image to obtain fish body features and fin features; and the first fish body integrity identification result is determined based on the fish body features and fin features.
[0067] In an embodiment of the present invention, the sorting line carries the fish at a certain speed through the collection area of the image acquisition device, and the image acquisition device is used to collect images of the fish in the collection area to obtain an image to be identified for each fish. After obtaining the image to be identified, the image to be identified can be subjected to target detection by an existing target detection algorithm to obtain a fish detection frame (x, y, w, h, r), where (x, y) is the coordinate of the center point of the fish detection frame, w is the width of the fish detection frame, h is the height of the fish detection frame, and r is the confidence of the fish detection frame. The image in the fish detection frame in the image to be identified is extracted as the fish image. The fish image can be subjected to image recognition by an image acquisition device or an image recognition algorithm in a host computer to obtain fish body features and fin features. The fish body integrity recognition result is determined by fish body features and fish fin features. Its purpose is to decouple the components of fish body integrity during model training so that the fish body integrity score will not be obtained at the end values, such as 0 and 1. 0 means that the fish body is "completely disappeared" and 1 means that the fish body is "perfect". In the actual sorting process, "completely disappeared" and "perfect" fish bodies do not exist and can only be approximated. Therefore, in order to avoid overfitting during model training, fish body features and fish fin features can be extracted to jointly determine the fish body integrity score, so that the fish body integrity score can be expressed by features of two different dimensions. It should be noted that overfitting will cause the model to identify blank images as fish bodies and give fish body integrity scores during the recognition process, or identify too many fish bodies as "perfect", resulting in the integrity scores being clustered at 1.
[0068] Specifically, the above-mentioned image recognition model may include a common network, a fish body feature extraction network, a fin feature network, a feature fusion network, and an output network. The common features of the fish body image are extracted through the common network, the fish body features are extracted from the common features through the fish body feature extraction network, and the fin features are extracted from the common features through the fin feature extraction network. The fish body features and fin features are fused through the feature fusion network to obtain fused features. The fused features are linearly transformed through the output network to output the corresponding fish body integrity score.
[0069] Optionally, after the step of performing integrity identification on the fish bodies on the sorting line in the first sorting mode and obtaining the first fish body integrity identification result, the first fish body integrity identification result within the first preset time can also be obtained; based on the first fish body integrity identification result within the first preset time, the integrity mean and integrity standard deviation within the first preset time are determined; based on the integrity mean and integrity standard deviation, it is judged whether the first fish body integrity identification result within the first preset time obeys the first integrity curve.
[0070] In an embodiment of the present invention, the first preset time period may be a manually set time period, or a time period determined by the transport speed of the sorting line, where the faster the transport speed, the shorter the first preset time period. Alternatively, the time period may be determined by the time required for the sorting line to transport a preset number of fish. The first fish integrity recognition result represents the fish integrity score identified in the first sorting mode. The first fish integrity recognition results within the first preset time period may be represented by a set.
[0071] The above-mentioned first integrity curve conforms to the Gaussian distribution in the local area. The fish body integrity score range corresponding to the local area conforming to the Gaussian distribution is determined in the first integrity curve, and it is judged whether the first fish body integrity score within the first preset time also conforms to the Gaussian distribution within the above-mentioned fish body integrity score range. If so, it can be determined that the first fish body integrity recognition result within the first preset time obeys the first integrity curve. If not, it can be determined that the first fish body integrity recognition result within the first preset time does not obey the first integrity curve.
[0072] Specifically, the average score of all first fish body integrity scores within a first preset time period can be calculated as the integrity mean within the first preset time period, the standard deviation of all first fish body integrity scores within the first preset time period can be calculated as the integrity standard deviation within the first preset time period, the integrity mean and integrity standard deviation within the first preset time period can be compared with the mean and standard deviation of a Gaussian distribution, and based on the comparison result, whether the first fish body integrity recognition result within the first preset time period conforms to the first integrity curve can be determined. More specifically, the mean and standard deviation of the Gaussian distribution corresponding to a local region can be extracted as feature vectors of the first integrity curve, the integrity mean and integrity standard deviation within the first preset time period can be used as feature vectors of the first fish body integrity recognition result within the first preset time period, and the vector angle between the feature vector of the first integrity curve and the feature vector of the first fish body integrity recognition result within the first preset time period can be calculated. When the vector angle is less than the preset angle, it can be determined that the first fish body integrity recognition result within the first preset time period conforms to the first integrity curve. When the vector angle is greater than the preset angle, it can be determined that the first fish body integrity recognition result within the first preset time period does not conform to the first integrity curve.
[0073] Whether the first fish body integrity recognition result within the first preset time obeys the first integrity curve can be quickly determined by the integrity mean and integrity standard deviation within the first preset time.
[0074] Optionally, in the step of determining the second integrity curve according to the first fish body integrity recognition result in the first preset time, the second integrity curve in the first preset time can be determined according to the first fish body integrity recognition result in the first preset time, the integrity mean value and the integrity standard deviation.
[0075] In the embodiment of the present application, the Gaussian distribution to which the first fish body integrity recognition result in the first preset time is subjected can be determined by the integrity mean value and the integrity standard deviation, and the second integrity curve can be determined according to the Gaussian distribution to which the first fish body integrity recognition result in the first preset time is subjected. The Gaussian distribution to which the first fish body integrity recognition result in the first preset time is subjected can be a local area on the second integrity curve.
[0076] Specifically, the highest point of the Gaussian distribution is obtained at the mean value, and the concentration degree of the Gaussian distribution is determined by the standard deviation. The smaller the standard deviation is, the more concentrated the Gaussian distribution is. Therefore, the highest point and the concentration degree of the Gaussian distribution can be determined by the integrity mean value and the integrity standard deviation, the local area of the Gaussian distribution of the first fish body integrity score in the first preset time is determined, the remaining area is counted according to the remaining first fish body integrity score, a segmented curve is formed, the segmented curve is connected with the curve of the Gaussian distribution, and the second integrity curve is obtained.
[0077] In a possible embodiment, the Gaussian distribution of the first fish body integrity score in the first preset time can be directly used as the second integrity curve. This is because the local area of the Gaussian distribution is a high-probability area, and the local area of the Gaussian distribution is a low-probability area. Therefore, the curve of the Gaussian distribution can be directly used as the second integrity curve.
[0078] Optionally, each sorting mode corresponds to a third integrity curve, and in the step of determining the second sorting mode according to the second integrity curve, the fitting degree between the second integrity curve and each third integrity curve can be calculated; the third integrity curve with a fitting degree greater than a preset fitting degree is determined as a candidate curve; the candidate curve with the highest fitting degree is selected as a first target curve, and the corresponding second sorting mode is determined according to the first target curve.
[0079] In the embodiment of the present application, there is a mapping relationship between each sorting mode and a third integrity curve, and the mapping relationship between the sorting mode and the third integrity curve is maintained by a mapping table.
[0080] After obtaining the second integrity curve, the degree of fit between the second integrity curve and each third integrity curve can be calculated using existing data processing software such as Origin or MATLAB. The degree of fit indicates the degree of similarity between the second integrity curve and the third integrity curve. A greater degree of fit indicates a greater similarity between the second and third integrity curves, while a smaller degree of fit indicates a greater dissimilarity between the second and third integrity curves.
[0081] Of course, the similarity between the second integrity curve and the third integrity curve can also be used as the degree of fit between the second integrity curve and each third integrity curve. Alternatively, the cosine similarity between the eigenvector of the second integrity curve and the eigenvector of the third integrity curve can be used as the degree of fit between the second integrity curve and each third integrity curve, where the eigenvector of the second integrity curve is composed of the mean and standard deviation of the second integrity curve, and the eigenvector of the third integrity curve is composed of the mean and standard deviation of the third integrity curve.
[0082] After obtaining the degrees of fit between the second integrity curve and each third integrity curve, the third integrity curve having a degree of fit greater than a preset degree of fit is determined as a candidate curve, the candidate curve with the greatest degree of fit among the candidate curves is selected as the first target curve, and the sorting mode corresponding to the first target curve is determined as the second sorting mode.
[0083] Optionally, after calculating the degree of fit between the second integrity curve and each third integrity curve, if there is no third integrity curve with a degree of fit greater than a preset degree of fit, the third integrity curve with the highest degree of fit can be obtained as the second target curve; the corresponding second sorting mode is determined according to the second target curve, and the second integrity curve is fit to the second target curve to obtain a fitting curve; the second sorting mode is fine-tuned by the fitting curve to obtain a third sorting mode, and the integrity of the fish bodies on the sorting line is identified in the third sorting mode to obtain a third fish body integrity identification result, and the third sorting mode performs sorting based on the third fish body integrity identification result.
[0084] In this embodiment of the present invention, after determining the fit between the second integrity curve and each third integrity curve, if no third integrity curve exists with a fit greater than a predetermined fit, this indicates that the second integrity curve differs significantly from each of the third integrity curves, and the existing sorting mode is unsuitable for sorting the current batch of fish. In this case, the third integrity curve with the highest fit is obtained as the second target curve, and the second integrity curve is fitted to the second target curve to obtain a fitted curve. The fitted curve is closer to the second integrity curve than the second target curve.
[0085] The second integrity curve and the second target curve can be fitted by existing data processing software such as Origin and MATLAB, or by fitting the second integrity curve and the second target curve by the least square method to obtain a fitting curve.
[0086] The second target curve is used to find the corresponding sorting mode in the mapping table as a candidate sorting mode. The candidate sorting mode is then fine-tuned using the curve fitting method to create a third sorting mode that is compatible with the fish sorting scenario of the fitted curve. Because the fitted curve is derived from the second integrity curve and the second target curve, it shares the distribution patterns of the second integrity curve and the second target curve. Therefore, the third sorting mode can more closely approximate the fish sorting scenario of the second integrity curve. If no suitable second sorting mode is found, the adjusted third sorting mode is used to sort fish on the sorting line. Compared to existing sorting modes, this third sorting mode is more compatible with the fish sorting scenario of the second integrity curve, resulting in a better balance between speed and accuracy.
[0087] In one possible embodiment, when the fish sorting system operates in the third sorting mode, the third sorting mode can be iterated according to the above embodiment until the sorting of the current batch of fish bodies is completed, and the final third sorting mode is obtained and stored, and the second integrity curve of the last iteration is used as the third integrity curve of the final third sorting mode for relationship mapping, and the mapping relationship is added to the mapping table for maintenance.
[0088] Optionally, after the step of obtaining the third sorting pattern, a third fish body integrity recognition result within a second preset time can also be obtained; the third sorting pattern is reinforced learned through the third fish body integrity recognition result within the second preset time to obtain the third sorting pattern after reinforcement learning; the third sorting pattern after reinforcement learning is associated with the second integrity curve and saved, so that the third sorting pattern after reinforcement learning can replace the first sorting pattern.
[0089] In an embodiment of the present invention, when the fish sorting system operates in the third sorting mode, a third fish integrity recognition result within a second preset time period can be obtained, and the third fish integrity recognition result can be verified to obtain the product of the accuracy of the third fish integrity recognition result within the second preset time period and the sorting speed. The third fish integrity recognition result within the second preset time period and its accuracy are used as reinforcement learning samples. Reinforcement learning is performed on the third sorting mode with the accuracy and sorting speed as rewards. The reinforcement learning continuously adjusts at least one of the shooting parameters of the image acquisition device, the carrying speed of the sorting line, the control parameters of the sorting robot arm, and the integrity recognition algorithm with the goal of obtaining a higher reward value until the reward value converges or the sorting of the current batch of fish is completed. The third sorting mode after reinforcement learning is obtained. The third sorting mode after reinforcement learning is associated with the second integrity curve through a mapping relationship, and the third sorting mode after reinforcement learning and the second integrity curve after reinforcement learning are saved. When sorting subsequent batches of fish, the third sorting mode after reinforcement learning can be directly matched according to steps 101, 102, and 103 above. Specifically, the mapping relationship between the third sorting pattern after reinforcement learning and the second integrity curve can be added to a mapping table for maintenance, and the third sorting pattern after reinforcement learning can be directly matched and replaced through the mapping table.
[0090] It should be noted that the fish sorting method provided in the embodiment of the present invention can be applied to devices such as photographing equipment, smart phones, computers, servers, etc. that can perform fish sorting.
[0091] like Figure 2 As shown, an embodiment of the present invention provides a fish catch sorting device, which includes:
[0092] An identification module 201 is configured to perform integrity identification on fish on a sorting line in a first sorting mode to obtain a first fish integrity identification result, wherein the first sorting mode corresponds to a first integrity curve, and the first sorting mode performs sorting based on the first fish integrity identification result;
[0093] A first determining module 202 is configured to determine a second integrity curve based on the first fish body integrity recognition result within the first preset time if the first fish body integrity recognition result within the first preset time does not conform to the first integrity curve;
[0094] The first processing module 203 is configured to determine a second sorting mode based on the second integrity curve, and perform integrity identification on the fish bodies on the sorting line under the second sorting mode to obtain a second fish body integrity identification result. The second sorting mode performs sorting based on the second fish body integrity identification result.
[0095] Optionally, the identification module 201 includes:
[0096] An acquisition submodule, configured to acquire images of fish on the sorting line;
[0097] A first processing submodule is used to perform feature extraction processing on the fish body image to obtain fish body features and fish fin features;
[0098] The first determination submodule is used to determine a first fish body integrity recognition result based on the fish body features and the fish fin features.
[0099] Optionally, the device further includes:
[0100] A first acquisition module is used to obtain the first fish body integrity recognition result within a first preset time;
[0101] A second determining module is configured to determine an integrity mean and an integrity standard deviation within a first preset time period based on the first fish body integrity recognition result within a first preset time period;
[0102] A judgment module is used to judge whether the first fish body integrity recognition result within a first preset time obeys a first integrity curve based on the integrity mean and the integrity standard deviation.
[0103] Optionally, the first determining module 202 includes:
[0104] The second determining submodule is configured to determine a second integrity curve within the first preset time according to the first fish body integrity recognition result, the integrity mean and the integrity standard deviation within the first preset time.
[0105] Optionally, the first processing module 203 includes:
[0106] a calculation submodule, configured to calculate a degree of fit between the second integrity curve and each third integrity curve;
[0107] a third determination submodule, configured to determine a third integrity curve having a fitting degree greater than a preset fitting degree as a candidate curve;
[0108] The fourth determining submodule is configured to select the candidate curve with the highest fitting degree as the first target curve, and determine the second sorting mode according to the sorting mode corresponding to the first target curve.
[0109] Optionally, the device further includes:
[0110] a second acquisition module, configured to acquire the third integrity curve with the highest degree of fit as the second target curve if there is no third integrity curve with a degree of fit greater than the preset degree of fit;
[0111] a second processing module, configured to determine a corresponding candidate sorting mode according to the sorting mode corresponding to the second target curve, and fit the second integrity curve to the second target curve to obtain a fitting curve;
[0112] The third processing module is used to fine-tune the candidate sorting mode through the fitting curve to obtain a third sorting mode, and perform integrity identification on the fish bodies on the sorting line under the third sorting mode to obtain a third fish body integrity identification result. The third sorting mode performs sorting based on the third fish body integrity identification result.
[0113] Optionally, the device further includes:
[0114] A third acquisition module is used to obtain the third fish body integrity recognition result within a second preset time;
[0115] a fourth processing module, configured to perform reinforcement learning on the third sorting mode according to the third fish body integrity recognition result within the second preset time, to obtain the third sorting mode after reinforcement learning;
[0116] and a fifth processing module, configured to associate and save the third sorting pattern after reinforcement learning with the second integrity curve, so that the third sorting pattern after reinforcement learning can replace the first sorting pattern.
[0117] It should be noted that the fish catch sorting device provided in the embodiment of the present invention can be applied to devices such as photographing equipment, smart phones, computers, servers, etc. that can sort fish catches.
[0118] The fish sorting device provided in the embodiment of the present invention can implement each process implemented by the fish sorting method in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0119] See also Figure 3 , Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, it includes: a memory 302, a processor 301, and a computer program of a fish catch sorting method stored in the memory 302 and executable on the processor 301, wherein:
[0120] The processor 301 is configured to call the computer program stored in the memory 302 and execute the following steps:
[0121] Performing integrity identification on fish bodies on a sorting line in a first sorting mode to obtain a first fish body integrity identification result, wherein the first sorting mode corresponds to a first integrity curve, and the first sorting mode performs sorting based on the first fish body integrity identification result;
[0122] If the first fish body integrity recognition result within the first preset time does not conform to the first integrity curve, determining a second integrity curve according to the first fish body integrity recognition result within the first preset time;
[0123] A second sorting mode is determined according to the second integrity curve, and integrity identification is performed on the fish bodies on the sorting line in the second sorting mode to obtain a second fish body integrity identification result. The second sorting mode performs sorting based on the second fish body integrity identification result.
[0124] Optionally, the processor 301 performs integrity identification on the fish bodies on the sorting line in the first sorting mode to obtain a first fish body integrity identification result, including:
[0125] Acquiring fish body images on the sorting line;
[0126] Performing feature extraction processing on the fish body image to obtain fish body features and fish fin features;
[0127] A first fish body integrity recognition result is determined based on the fish body features and the fish fin features.
[0128] Optionally, after performing integrity identification on the fish bodies on the sorting line in the first sorting mode and obtaining a first fish body integrity identification result, the method executed by the processor 301 further includes:
[0129] Obtaining the first fish body integrity recognition result within a first preset time;
[0130] Determining the integrity mean and integrity standard deviation within the first preset time based on the first fish body integrity recognition result within the first preset time;
[0131] According to the integrity mean and the integrity standard deviation, it is determined whether the first fish body integrity recognition result within a first preset time obeys a first integrity curve.
[0132] Optionally, the determining of the second integrity curve according to the first fish body integrity recognition result within the first preset time performed by the processor 301 includes:
[0133] A second integrity curve within the first preset time is determined according to the first fish body integrity recognition result, the integrity mean and the integrity standard deviation within the first preset time.
[0134] Optionally, each sorting mode corresponds to a third integrity curve, and the processor 301 determines the second sorting mode according to the second integrity curve, including:
[0135] calculating a degree of fit between the second integrity curve and each third integrity curve;
[0136] Determining a third integrity curve having a fitting degree greater than a preset fitting degree as a candidate curve;
[0137] The candidate curve with the highest fitting degree is selected as the first target curve, and the second sorting mode is determined according to the sorting mode corresponding to the first target curve.
[0138] Optionally, after calculating the degree of fit between the second integrity curve and each third integrity curve, the method executed by the processor 301 further includes:
[0139] If there is no third integrity curve with a fitting degree greater than the preset fitting degree, obtaining the third integrity curve with the highest fitting degree as the second target curve;
[0140] determining a corresponding candidate sorting mode according to the sorting mode corresponding to the second target curve, and fitting the second integrity curve to the second target curve to obtain a fitting curve;
[0141] The candidate sorting mode is fine-tuned using the fitting curve to obtain a third sorting mode, and the integrity of the fish bodies on the sorting line is identified under the third sorting mode to obtain a third fish body integrity identification result. The third sorting mode performs sorting based on the third fish body integrity identification result.
[0142] Optionally, after obtaining the third sorting mode, the method executed by the processor 301 further includes:
[0143] Obtaining the third fish body integrity recognition result within a second preset time;
[0144] Performing reinforcement learning on the third sorting mode according to the third fish body integrity recognition result within the second preset time to obtain the third sorting mode after reinforcement learning;
[0145] The third sorting pattern after reinforcement learning is associated with the second integrity curve and saved, so that the third sorting pattern after reinforcement learning can replace the first sorting pattern.
[0146] It should be noted that the electronic device provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can perform the fish sorting method.
[0147] The electronic device provided in the embodiment of the present invention can implement each process implemented by the fish sorting method in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0148] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement each process of the fish catch sorting method or the application end fish catch sorting method provided by the embodiment of the present application, and the same technical effects can be achieved. To avoid repetition, details are not described herein.
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program to instruct related hardware. The program can be stored in a computer readable storage medium. When the program is executed, the processes of the above-mentioned embodiment methods can be included. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM).
[0150] The above only describes the preferred embodiments of the present application, and of course cannot limit the scope of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope of the present application.
Claims
1. A method for sorting fish catches, characterized in that: The method comprises the following steps: Performing integrity identification on fish bodies on a sorting line in a first sorting mode to obtain a first fish body integrity identification result, wherein the first sorting mode corresponds to a first integrity curve, and the first sorting mode performs sorting based on the first fish body integrity identification result; If the first fish body integrity recognition result within the first preset time does not conform to the first integrity curve, determining a second integrity curve according to the first fish body integrity recognition result within the first preset time; Determining a second sorting mode according to the second integrity curve, and performing integrity identification on the fish on the sorting line in the second sorting mode to obtain a second fish integrity identification result, and performing sorting in the second sorting mode based on the second fish integrity identification result; Each sorting mode corresponds to a third integrity curve, and determining the second sorting mode according to the second integrity curve includes: calculating a degree of fit between the second integrity curve and each third integrity curve; Determining a third integrity curve having a fitting degree greater than a preset fitting degree as a candidate curve; Selecting the candidate curve with the highest fitting degree as the first target curve, and determining the sorting mode corresponding to the first target curve as the second sorting mode; If there is no third integrity curve with a fitting degree greater than the preset fitting degree, obtaining the third integrity curve with the highest fitting degree as the second target curve; determining a corresponding candidate sorting mode according to the sorting mode corresponding to the second target curve, and fitting the second integrity curve to the second target curve to obtain a fitting curve; The candidate sorting mode is fine-tuned using the fitting curve to obtain a third sorting mode, and the integrity of the fish bodies on the sorting line is identified under the third sorting mode to obtain a third fish body integrity identification result. The third sorting mode performs sorting based on the third fish body integrity identification result.
2. The method for sorting fish catches according to claim 1, wherein: The step of performing integrity identification on the fish bodies on the sorting line in the first sorting mode to obtain a first fish body integrity identification result includes: Acquiring fish body images on the sorting line; Performing feature extraction processing on the fish body image to obtain fish body features and fish fin features; A first fish body integrity recognition result is determined based on the fish body features and the fish fin features.
3. The method for sorting fish catches according to claim 1, wherein: After performing integrity identification on the fish bodies on the sorting line in the first sorting mode and obtaining a first fish body integrity identification result, the method further includes: Obtaining the first fish body integrity recognition result within a first preset time; Determining the integrity mean and integrity standard deviation within the first preset time based on the first fish body integrity recognition result within the first preset time; According to the integrity mean and the integrity standard deviation, it is determined whether the first fish body integrity recognition result within a first preset time obeys a first integrity curve.
4. The method for sorting fish catches according to claim 3, wherein: The determining of a second integrity curve according to the first fish body integrity recognition result within a first preset time includes: A second integrity curve within the first preset time is determined according to the first fish body integrity recognition result, the integrity mean and the integrity standard deviation within the first preset time.
5. The method for sorting fish catches according to any one of claims 1 to 4, characterized in that: After fine-tuning the candidate sorting pattern by using the fitting curve to obtain a third sorting pattern, the method further includes: Obtaining the third fish body integrity recognition result within a second preset time; Performing reinforcement learning on the third sorting mode according to the third fish body integrity recognition result within the second preset time to obtain the third sorting mode after reinforcement learning; The third sorting pattern after reinforcement learning is associated with the second integrity curve and saved, so that the third sorting pattern after reinforcement learning can replace the first sorting pattern.
6. A fish catch sorting device, characterized in that: The fish catch sorting device comprises: an identification module, configured to perform integrity identification on fish on the sorting line in a first sorting mode to obtain a first fish integrity identification result, wherein the first sorting mode corresponds to a first integrity curve, and the first sorting mode performs sorting based on the first fish integrity identification result; a first determining module, configured to determine a second integrity curve based on the first fish body integrity recognition result within the first preset time if the first fish body integrity recognition result within the first preset time does not conform to the first integrity curve; a first processing module, configured to determine a second sorting mode according to the second integrity curve, and perform integrity identification on the fish on the sorting line in the second sorting mode to obtain a second fish integrity identification result, wherein the second sorting mode performs sorting based on the second fish integrity identification result; Each sorting mode corresponds to a third integrity curve, and the first processing module is used to determine the second sorting mode according to the second integrity curve, specifically for: calculating a degree of fit between the second integrity curve and each third integrity curve; Determining a third integrity curve having a fitting degree greater than a preset fitting degree as a candidate curve; Selecting the candidate curve with the highest fitting degree as the first target curve, and determining the sorting mode corresponding to the first target curve as the second sorting mode; If there is no third integrity curve with a fitting degree greater than the preset fitting degree, obtaining the third integrity curve with the highest fitting degree as the second target curve; determining a corresponding candidate sorting mode according to the sorting mode corresponding to the second target curve, and fitting the second integrity curve to the second target curve to obtain a fitting curve; The candidate sorting mode is fine-tuned using the fitting curve to obtain a third sorting mode, and the integrity of the fish bodies on the sorting line is identified under the third sorting mode to obtain a third fish body integrity identification result. The third sorting mode performs sorting based on the third fish body integrity identification result.
7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the fish sorting method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the fish catch sorting method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Squid quality grade identifying and sorting method
CN110110810A
Fishing target classification detection method and system based on image recognition
CN113569971A