Crayfish form inconsistent feature point identification error compensation method and system
Collect crayfish images with high-definition cameras, establish an error trend analysis model, and combine it with the recognition system to correct position information in real time, solving the problem of feature point recognition errors in crayfish deheading equipment, improving recognition accuracy and stability, and ensuring high efficiency. identification results.
Patent Information
- Application Number
- CN202410519482.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-04-28
AI Technical Summary
The existing crayfish deheading equipment lacks full automation, resulting in low manual operation efficiency, poor hygiene, easy to cause secondary pollution, affecting the quality of crayfish, and the accuracy and stability of feature point identification are poor.
A high-definition camera is used to collect images of crayfish in different postures and directions. A feature point error compensation model is established through error trend analysis. Position information is corrected in real time with the camera recognition system. Polynomial fitting and CNN models are used for error compensation. Parameters are dynamically adjusted to improve Recognition accuracy and stability.
It achieves accurate compensation for the recognition error of inconsistent feature points of crayfish morphology, improves the recognition accuracy and stability, ensures the timeliness and accuracy of the recognition results, and enhances the robustness and adaptability of the system.
Smart Images

Figure CN118691950A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for compensating for errors in identifying inconsistent feature points of crayfish morphology. Background Art
[0002] In the international market, crayfish and its products are mostly traded in the form of frozen processed goods, which is an important part of the world's aquatic product trade. The processing process of quick-frozen crayfish tails includes the following steps: raw crayfish selection, cleaning, steaming, cooling, head and tail separation, quick freezing, and cold storage.
[0003] Because frozen crayfish with crayfish heads are difficult to store for a long time, and crayfish heads are rich in nutrients, they can be processed into a variety of products including fertilizers, turning waste into treasure and making comprehensive utilization. Therefore, decapitation of crayfish is one of the most important process steps. At present, there is no fully automatic equipment for shelling and decapitation on the market. Most of the crayfish decapitation operations are done manually, with low speed and efficiency, poor hygiene, and easy to cause secondary pollution of crayfish, which affects the quality of crayfish to a certain extent.
[0004] The Chinese invention patent with application number 20211167827.8 discloses a crayfish head-tail separation control method and system based on deep learning, including the following steps: obtaining the crayfish posture image to be tested and preprocessing the image; using the CNN (convolutional neural network) after deep learning to identify the preprocessed crayfish posture image to obtain the crayfish posture information; then, after foolproof calculation and coordinate data compensation calculation, the optimal coordinates for crayfish head-tail separation are obtained; the optimal coordinates for crayfish head-tail separation are sent to the manipulator, and the manipulator realizes the crayfish head-tail separation according to the optimal coordinates for crayfish head-tail separation. The coordinate data compensation calculation in this application includes 2D plane compensation, 3D height compensation, duplicate data elimination compensation, position compensation, optimal coordinate screening compensation, and volume compensation. 2D plane compensation is a height compensation performed by compensating fixed values in the X and Y directions and measuring the width of the shrimp. The compensation coefficient C is also a fixed value, and the accuracy and stability of feature point recognition are poor. Summary of the invention
[0005] The purpose of the present invention is to accurately capture the law of error change with position, and based on this, realize effective compensation for recognition errors, thereby improving the accuracy and stability of feature point recognition. In view of the above-mentioned shortcomings of the prior art, a method and system for compensating errors in recognition of inconsistent feature points of crayfish morphology are proposed.
[0006] A method for compensating for the recognition error of inconsistent feature points of crayfish morphology, characterized by comprising the following steps: Data collection: Use a high-definition camera to collect images of crayfish in different postures, positions and directions, and record the actual position and visually recognized position of crayfish in the X direction, Y direction, different angles and different postures; Error trend analysis: Perform error trend analysis on the preprocessed image data and establish a feature point error compensation model; Correcting the camera recognition position: The error compensation model is combined with the camera recognition system. During the real-time recognition process, the compensation parameters are calculated through the error compensation model according to the current position and posture of the crayfish. The compensation parameters in the X and Y directions are added to the X and Y coordinates of the camera recognition position, respectively, to obtain the corrected position information. Output corrected position information: The corrected camera recognition position is output for subsequent processing and application.
[0007] Before performing feature point error trend analysis, the image is processed in a series of ways to reduce noise, enhance features, and improve image quality and analyzability. The preprocessing method includes the following steps: Denoising: removing noise from the image to ensure the accuracy of subsequent analysis; Image enhancement: enhance the contrast and clarity of the image and highlight the feature points; Edge detection: Detect edge information in the image, which helps locate feature points; Scale calibration: The image is calibrated based on the calibration plate to ensure that the position information of the feature points is consistent with the position in the actual physical space; The purpose of preprocessing is to improve the quality and analyzability of the image, making the subsequent feature point error trend analysis more accurate and reliable.
[0008] The above technical scheme is further configured as follows: the error trend analysis method is for crayfish in different postures and directions, including 0° upright, 90° upright, 0° inclined plane upright, 180° inclined plane upright, 90° lying upright, 180° lying upright, 0° inclined plane lying, 270° inclined plane lying, 0° lying on the side, 90° lying on the side, 180° lying on the side and 270° lying on the side, and a feature point error compensation model is established using a polynomial fitting method.
[0009] The above technical solution is further configured as follows: the polynomial fitting method establishes a feature point error compensation model, comprising the following steps: S1. Collect crayfish image data in corresponding postures and directions, and mark the error between the real position and the camera recognition position; S2. Based on the collected data, a polynomial fitting method is used to fit the law of error variation with position relationship to obtain a polynomial function; S3. The polynomial function obtained by fitting is applied to the real-time recognition process to realize real-time correction of the X-coordinate and Y-coordinate of the camera recognition position, thereby compensating for the errors in the X-direction and Y-direction of the visual field.
[0010] The above technical scheme is further configured as follows: the error trend analysis method is to use CNN to establish a feature point error compensation model for crayfish in different postures and directions, including 180° upright, 270° upright, 90° inclined plane upright, 270° inclined plane upright, 0° upright, 270° upright, 90° inclined plane inclined and 180° inclined plane inclined.
[0011] By adopting the above technical solution, the data collected from different postures and angles of crayfish are analyzed. According to the error between the actual position and the recognized position, the polynomial fitting method is used in the actual application process, because the polynomial fitting degree is relatively high under the postures and angles of crayfish lying on its back (0°, 90°), lying on its back at an angle (0°, 180°), lying on its back at an angle (90°, 180°), lying on its side at an angle (0°, 270°), and lying on its side (0°, 90°, 180°, 270°). The others are compensated by CNN.
[0012] The above technical solution is further configured as follows: the CNN establishes a feature point error compensation model, comprising the following steps: S1. Prepare crayfish image data in corresponding postures and directions, and mark the errors in the X and Y directions between the real position and the camera recognition position; S2. Build a CNN model suitable for X-direction and Y-direction errors, which takes the crayfish image as input and outputs the errors of the X-coordinate and Y-coordinate of the camera recognition position; S3. In the model training phase, the CNN model is trained using labeled data so that it can accurately learn the characteristics of the X-direction and Y-direction errors; S4. After training, the CNN model can accept crayfish images as input and output the errors in the X and Y directions to achieve real-time correction of the X and Y coordinates of the camera recognition position.
[0013] The above technical solution is further configured to: perform static parameter optimization on the error compensation model, including the following steps: S1. Define a parameter space based on the complexity of the model and the number of parameters to be optimized. S2, divide the data set into a training set and a validation set, train the model on the training set, and evaluate the model performance on the validation set; S3. Use cross-validation techniques to evaluate the performance of each parameter combination on the training set. S4. Through the grid search method, search and find the parameter combination that achieves the best performance in the parameter space. The above technical solution is further configured as follows: the method for obtaining the data set includes: Data collection: Obtain the position, posture and angle of the crayfish through the camera; Data annotation: Based on the actual position of the crayfish on the belt and the position recognized by the camera, the error between the actual position and the position recognized by the camera (error in the X and Y directions) is annotated; Data cleaning: Clean the collected data, remove unqualified images or data with incorrect annotations, and ensure the quality and availability of the data; Divide the data set and validation set, and use cross-validation: Divide the data set into multiple mutually exclusive subsets, select one of the subsets as the validation set, and the remaining subsets as the training set. Through multiple cross-validations, the performance of the model can be more comprehensively evaluated.
[0014] The above technical solution is further configured as follows: the parameter combination performance evaluation method includes: Data partitioning: First, the data set is divided into several mutually exclusive subsets in a certain way, one of which is used as a validation set and the remaining subsets are used as training sets; Model training: For each parameter combination, the model is trained using the training subset. During the training process, the parameters of the model are adjusted according to the parameter combination; Model evaluation: Use the validation subset to evaluate the trained model. Use the accuracy of the output results to measure the performance of the model on the validation set; Performance index statistics: The performance index (accuracy, error size) obtained by K cross-validation is counted to obtain the average performance index. This can reduce the randomness introduced by different data divisions.
[0015] Select the best parameter combination: Based on the average performance index, select the parameter combination with the best performance as the final model parameters.
[0016] The above technical solution is further configured to: also include dynamic parameter adaptive adjustment of the error compensation model, including the following steps: monitoring the error size or accuracy of the model in real-time applications, and adaptively adjusting the model parameters according to changes in these indicators.
[0017] The above technical solution is further configured to: also include dynamically adaptively adjusting the parameters of the error compensation model, including the following steps: Performance indicator monitoring: 1. During the real-time recognition process, continuously monitor the performance indicators of the model (accuracy, error size).
[0018] 2. Update performance indicators regularly and process a certain number of images.
[0019] Setting the threshold: 1. Set a threshold to determine whether the model performance reaches the expected level.
[0020] 2. If the model error exceeds the pre-set threshold in several consecutive cycles, it means that the model performance may have deteriorated and parameter adjustment is required.
[0021] Parameter adjustment strategy: Based on the changes in the monitored performance indicators, different parameter adjustment strategies are adopted: 1. Adjustment when the error increases: If the model's error in real-time applications is detected to increase, it may be due to factors such as changes in environmental conditions or shifts in data distribution; At this point, you can choose to increase the compensation parameters to make the model more sensitive to the current recognition error and quickly adapt to new environments or data changes; 2. Adjustment when the error decreases: If the model error decreases in real-time applications, it may be because the environmental conditions have stabilized or the model has adapted to the current data distribution; In this case, the compensation parameters can be appropriately reduced to avoid over-adjustment while maintaining the stability and performance of the model; Parameter adjustment method: 1. Linear adjustment: According to the changes in the monitored performance indicators, the parameter value is adjusted linearly at a certain rate; according to the increase or decrease of the error, a fixed compensation amount is increased or decreased in each cycle.
[0022] 2. Exponential adjustment: Based on the changes in the monitored performance indicators, the parameter values are adjusted exponentially so that the adjustment speed increases or decreases over time. If the error increases over several consecutive cycles, the parameter adjustment speed is increased to adapt to the changes more quickly. Otherwise, the adjustment speed is slowed down to avoid over-adjustment.
[0023] Feedback control mechanism: A feedback control mechanism is designed to automatically adjust the model parameters according to the actual recognition results and error conditions. If the recognition results of the model in real-time applications deviate greatly from the actual position, the compensation parameters are increased; conversely, if the recognition results are close to the actual position, the compensation parameters are reduced.
[0024] Continuous optimization: Continuously monitor model performance and optimize and adjust parameter adjustment strategies based on actual conditions.
[0025] A crayfish morphology inconsistency feature point recognition error compensation system includes an image acquisition module, an image processing module, a data optimization module, a data compensation module, and a data correction module; wherein: The image acquisition module is used to acquire the crayfish posture image, and comprises a light source, a camera and an image sensor; The image processing module is used to receive the crayfish posture image acquired by the image acquisition module and preprocess the image; the data optimization module is used to perform error trend analysis on the preprocessed image data and establish a feature point error compensation model; the data compensation module is used to combine the error compensation model with the camera recognition system, and in the real-time recognition process, according to the current position and posture of the crayfish, calculate the compensation parameters through the error compensation model, and add the compensation parameters in the X direction and the Y direction to the X coordinate and the Y coordinate of the camera recognition position respectively, to obtain the corrected position information; The data correction module is used to optimize the static parameters and adaptively adjust the dynamic parameters of the error compensation model, and to make real-time corrections to the camera recognition position.
[0026] Beneficial effects: 1. Feature point error compensation model based on error trend: This paper conducts an in-depth analysis of the feature point recognition error caused by the inconsistency of crayfish morphology, and proposes a feature point error compensation model based on error trend. This model can accurately capture the law of error change with position, and based on this, effectively compensate for the recognition error, thereby improving the accuracy and stability of feature point recognition.
[0027] 2. Introduction of real-time correction mechanism: The present invention introduces a real-time correction mechanism, which combines the error compensation model with the camera recognition system to achieve real-time correction of the camera recognition position. By dynamically adjusting the compensation parameters, the recognition deviation caused by the inconsistency of the crayfish morphology can be corrected in time to ensure the timeliness and accuracy of the recognition results. This dynamic parameter adaptive adjustment mechanism can make the system more robust and adaptable, and can maintain high accuracy and stability in different scenarios and environments.
[0028] Through static parameter optimization and dynamic parameter adaptive adjustment, the error compensation model can achieve optimal performance in practical applications, thereby improving the accuracy and stability of crayfish morphological recognition.
[0029] 3. Multiple compensation model selection and optimization: The present invention is not limited to a single mathematical model, but provides multiple compensation model selections for different situations. Through the selection and optimization of two compensation models, it can effectively supplement the feature point recognition error for crayfish in different postures and directions, and improve the accuracy and stability of recognition. At the same time, a parameter adaptive adjustment mechanism is introduced to dynamically adjust the parameters of the compensation model according to the actual situation to adapt to the recognition error in different scenarios, thereby further improving the adaptability and accuracy of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a flow chart of the method for compensating errors in identifying inconsistent feature points of crayfish morphology according to the present invention.
[0031] Figure 2 The crayfish described in the present invention is photographed by a camera at Y=0, X=0 in a high-precision grid.
[0032] Figure 3 The crayfish described in the present invention is photographed by a camera in a high-precision grid with Y=10mm and X=0.
[0033] Figure 4 The crayfish described in the present invention is photographed by a camera in a high-precision grid with Y=20mm and X=0.
[0034] Figure 5 Taking the crayfish of the present invention lying on its side at 90° and Y equal to 0 as an example: X-direction error distribution diagram.
[0035] Figure 6 Based on the result of the error trend analysis described in the present invention, a polynomial fitting method is used to fit a curve showing the error changing with position. DETAILED DESCRIPTION
[0036] The following are specific embodiments of the present invention and the accompanying drawings to further describe the technical solution of the present invention, but the present invention is not limited to these embodiments.
[0037] A method for compensating the recognition error of inconsistent feature points of crayfish morphology, such as Figure 1 As shown, the following steps are included: Data collection: Use a high-definition camera to collect images of crayfish in different postures, positions and directions, and record the actual position and visually recognized position of crayfish in the X direction, Y direction, different angles and different postures; Error trend analysis: Perform error trend analysis on the preprocessed image data and establish a feature point error compensation model; Correcting the camera recognition position: The error compensation model is combined with the camera recognition system. During the real-time recognition process, the compensation parameters are calculated through the error compensation model according to the current position and posture of the crayfish. The compensation parameters in the X and Y directions are added to the X and Y coordinates of the camera recognition position, respectively, to obtain the corrected position information. Output corrected position information: The corrected camera recognition position is output for subsequent processing and application.
[0038] Example 1 The polynomial fitting compensation model includes the following steps: Data preprocessing: Use a high-definition camera to capture a certain number of images of crayfish (crayfish in different positions, postures, and angles on the belt), and preprocess the images, including denoising and image enhancement, to improve the accuracy of subsequent feature points.
[0039] Feature point extraction: Extract the feature points of crayfish from each image, including X-coordinate, Y-coordinate and other information.
[0040] Data collection: Record the actual position of the crayfish and the position identified by the camera in each image.
[0041] Take the crayfish lying on its side at 90 degrees as an example: The true position is the actual position of the crayfish in the high-precision grid, and the position recognized by the camera is the pre-processed position.
[0042] The Y direction is equal to 0, and the crayfish is moved in the X direction to record a set of data (the actual position of the crayfish and the position recognized by the camera); The Y direction is equal to 10 mm. Move the crayfish in the X direction and record a set of data (the actual position of the crayfish and the position recognized by the camera); The Y direction is equal to 20 mm, and the crayfish is moved along the X direction to record a set of data (the actual position of the crayfish and the position recognized by the camera); And so on, until the Y direction is equal to 280mm (the belt is 280mm long), and the data of the crayfish's movement in the X direction are recorded at intervals of 10mm in the Y direction.
[0043] For example: when the Y direction is equal to 0, record the data of the X direction movement (interval 10mm): Some pictures are shown as follows Figure 2-4 shown.
[0044] Error trend analysis: Analyze the error between the actual position of each feature point and the position recognized by the camera, and observe how the error changes with position.
[0045] Take the case of a crayfish lying on its side at 90° and Y equal to 0 as an example: the distribution of the error in the X direction is as follows: Figure 5 shown.
[0046] The X-axis is the distance the crayfish moves in the X direction, and the Y-axis is the error value between the actual position and the recognized position.
[0047] Polynomial fitting: Based on the results of error trend analysis, a polynomial fitting method is used to fit the curve of error variation with position, such as Figure 6 As shown, the fitting change curve equation is: y = 3E-10x5 - 2E-07x4 + 7E-05x3 - 0.0092x2 + 0.5501x - 10.427 (When X is equal to 0 in the Y direction, the distance the crayfish moves in the X direction, and y is the error) Parameter optimization: Optimize the parameters of the fitted polynomial model, such as the order of the polynomial, to obtain the best fitting effect.
[0048] Real-time correction: In practical applications, the fitted polynomial model is applied to the position recognized by the camera to make real-time corrections to the recognized position.
[0049] Example 2 CNN compensation model, the steps include: Data preprocessing: Use a high-definition camera to capture a certain number of images of crayfish (crayfish in different positions, postures, and angles on the belt), and preprocess the images, including denoising and image enhancement, to improve the accuracy of subsequent feature points.
[0050] Feature point extraction: Extract the feature points of crayfish from each image, including X-coordinate, Y-coordinate and other information.
[0051] Data collection: Record the actual position of the crayfish and the position identified by the camera in each image.
[0052] Take the example of a crayfish lying 180 degrees: The true position is the actual position of the crayfish in the high-precision grid, and the position recognized by the camera is the pre-processed position.
[0053] When the X direction is equal to 0, move the crayfish along the Y direction and record a set of data (the actual position of the crayfish and the position recognized by the camera) When the X direction is equal to 10mm, move the crayfish along the Y direction and record a set of data (the actual position of the crayfish and the position recognized by the camera) When the X direction is equal to 20mm, move the crayfish along the Y direction and record a set of data (the actual position of the crayfish and the position recognized by the camera) And so on, until the X direction is equal to 280mm (the belt width is 280mm), record the actual position and recognized position of the crayfish at every 10mm interval in the X direction.
[0054] Image annotation: Annotate the location information of the crayfish in each image, including X-coordinate, Y-coordinate, posture, angle, actual position and recognition position error.
[0055] Next, a CNN model suitable for X-direction and Y-direction errors is built, which takes the crayfish image as input and outputs the errors of the X-coordinate and Y-coordinate of the camera recognition position.
[0056] During the model training phase, the CNN model is trained using labeled data so that it can accurately learn the characteristics of the X- and Y-direction errors.
[0057] After training, the CNN model can accept crayfish images as input and output the errors in the X and Y directions to achieve real-time correction of the X and Y coordinates of the camera recognition position.
[0058] Example 3 Static parameter optimization: 1. Define parameter space: 1. For the polynomial fitting method, we select the order of the polynomial as a parameter. We set the order in the range of 1 to 10.
[0059] 2. For the Convolutional Neural Network (CNN) model, we can adjust the number of layers and the number of neurons in each layer. We set the number of layers to range from 1 to 5 and the number of neurons in each layer to range from 16 to 128.
[0060] 2. Cross Validation: 1. Divide the dataset into 5 mutually exclusive subsets in a certain way, 4 of which are used as training sets and the remaining 1 subset is used as a validation set.
[0061] 2. Train the model on the training set and evaluate the performance of the model on the validation set.
[0062] 3. Repeat the above steps multiple times, randomly dividing the training set and validation set each time to reduce the randomness caused by different data divisions.
[0063] 3. Grid Search: 1. Perform a grid search in the defined parameter space, trying every parameter combination.
[0064] 2. For the polynomial fitting method, traverse the order from 1 to 10; for the CNN model, traverse the number of layers from 1 to 5 and the number of neurons from 16 to 128.
[0065] 3. For each parameter combination, calculate the performance indicators (accuracy, error size) of the model on the validation set.
[0066] 4. Select the parameter combination with the best performance as the result of static parameter optimization.
[0067] 4. Specific parameter examples: 1. Polynomial fitting method: Degree: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 2. CNN model: Number of layers: 1, 2, 3, 4, 5 Number of neurons per layer: 16, 32, 64, 128.
[0068] Example 4 Dynamic parameter adaptive adjustment: 1. Performance indicator monitoring: 1. During the real-time recognition process, continuously monitor the performance indicators of the model (accuracy, error size).
[0069] 2. Update performance indicators regularly and process a certain number of images.
[0070] 2. Setting the threshold: 1. Set a threshold to determine whether the model performance reaches the expected level.
[0071] 2. If the model error exceeds the pre-set threshold in several consecutive cycles, it means that the model performance may have deteriorated and parameter adjustment is required.
[0072] 3. Parameter adjustment strategy: Based on the changes in the monitored performance indicators, different parameter adjustment strategies are adopted: 1. Adjustment when the error increases: If the model is monitored to have an increased error in real-time applications, it may be due to factors such as changes in environmental conditions or shifts in data distribution.
[0073] At this point, you can choose to increase the compensation parameters to make the model more sensitive to the current recognition error and to quickly adapt to new environments or data changes.
[0074] 2. Adjustment when the error decreases: If the model's error decreases in real-time applications, it may be because the environmental conditions have stabilized or the model has adapted to the current data distribution.
[0075] In this case, the compensation parameters can be appropriately reduced to avoid over-tuning while maintaining the stability and performance of the model.
[0076] 4. Parameter adjustment method: 1. Linear adjustment: According to the changes in the monitored performance indicators, the parameter values are adjusted linearly at a certain rate.
[0077] For example, a fixed compensation amount may be increased or decreased in each cycle according to the increase or decrease of the error.
[0078] 2. Index adjustment: Based on the changes in the monitored performance indicators, the parameter values are adjusted exponentially so that the adjustment speed increases or decreases over time.
[0079] For example, if the error increases over several consecutive cycles, the parameter adjustment speed should be increased to adapt to the changes more quickly; otherwise, the adjustment speed should be slowed down to avoid over-adjustment.
[0080] 5. Feedback control mechanism: Design a feedback control mechanism to automatically adjust model parameters according to actual recognition results and error conditions.
[0081] For example, if the recognition result of the model in the real-time application deviates greatly from the actual position, the compensation parameter is increased; conversely, if the recognition result is close to the actual position, the compensation parameter is reduced.
[0082] 6. Continuous Optimization: Continuously monitor model performance and optimize and adjust parameter adjustment strategies based on actual conditions.
[0083] You can review the performance of the model regularly and adjust the parameter adjustment strategy according to new data and environmental changes to maintain the accuracy and stability of the model.
[0084] For matters not mentioned above, the prior art applies.
[0085] Although some specific embodiments of the present invention have been described in detail through examples, those skilled in the art should understand that the above examples are for illustration only and are not intended to limit the scope of the present invention. Those skilled in the art to which the present invention belongs may make various modifications or supplements to the specific embodiments described or replace them in a similar manner, but they will not deviate from the direction of the present invention or exceed the scope defined by the attached claims. Those skilled in the art should understand that any modifications, equivalent substitutions, improvements, etc. made to the above embodiments based on the technical essence of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for compensating for the recognition error of inconsistent feature points of crayfish morphology, characterized in that: The steps include: Data collection: Use a high-definition camera to collect images of crayfish in different postures, positions and directions, and record the actual position and visually recognized position of crayfish in the X direction, Y direction, different angles and different postures; Error trend analysis: Perform error trend analysis on the preprocessed image data and establish a feature point error compensation model; Correcting the camera recognition position: The error compensation model is combined with the camera recognition system. During the real-time recognition process, the compensation parameters are calculated through the error compensation model according to the current position and posture of the crayfish. The compensation parameters in the X and Y directions are added to the X and Y coordinates of the camera recognition position, respectively, to obtain the corrected position information. Output corrected position information: The corrected camera recognition position is output for subsequent processing and application.
2. The method for compensating for the recognition error of inconsistent feature points of crayfish morphology according to claim 1, characterized in that: The error trend analysis method is for crayfish in different postures and directions, including 0° upright, 90° upright, 0° inclined plane upright, 180° inclined plane upright, 90° prone, 180° prone, 0° inclined plane prone, 270° inclined plane prone, 0° side lying, 90° side lying, 180° side lying and 270° side lying, and a feature point error compensation model is established using a polynomial fitting method.
3. The method for compensating the error of identifying feature points of crayfish morphology inconsistency according to claim 1, characterized in that: The polynomial fitting method establishes a feature point error compensation model, comprising the following steps: S1. Collect crayfish image data in corresponding postures and directions, and mark the error between the real position and the camera recognition position; S2. Based on the collected data, a polynomial fitting method is used to fit the law of error variation with position relationship to obtain a polynomial function; S3. The polynomial function obtained by fitting is applied to the real-time recognition process to realize real-time correction of the X-coordinate and Y-coordinate of the camera recognition position, thereby compensating for the errors in the X-direction and Y-direction of the visual field.
4. The method for compensating the error of identifying feature points of crayfish morphology inconsistency according to claim 1, characterized in that: The error trend analysis method uses CNN to establish a feature point error compensation model for crayfish in different postures and directions, including 180° upright, 270° upright, 90° inclined plane upright, 270° inclined plane upright, 0° upright, 270° upright, 90° inclined plane inclined and 180° inclined plane inclined.
5. The method for compensating for the recognition error of inconsistent feature points of crayfish morphology according to claim 4, characterized in that: The CNN establishes a feature point error compensation model, including the following steps: S1. Prepare crayfish image data in corresponding postures and directions, and mark the errors in the X and Y directions between the real position and the camera recognition position; S2. Build a CNN model suitable for X-direction and Y-direction errors, which takes the crayfish image as input and outputs the errors of the X-coordinate and Y-coordinate of the camera recognition position; S3. In the model training phase, the CNN model is trained using labeled data so that it can accurately learn the characteristics of the X-direction and Y-direction errors; S4. After training, the CNN model can accept crayfish images as input and output the errors in the X and Y directions to achieve real-time correction of the X and Y coordinates of the camera recognition position.
6. The method for compensating for the recognition error of inconsistent feature points of crayfish morphology according to any one of claims 2 to 5, characterized in that: Static parameter optimization of the error compensation model includes the following steps: S1. Define a parameter space based on the complexity of the model and the number of parameters to be optimized. S2, divide the data set into a training set and a validation set, train the model on the training set, and evaluate the model performance on the validation set; S3. Use cross-validation techniques to evaluate the performance of each parameter combination on the training set. S4. Through the grid search method, search and find the parameter combination that achieves the best performance in the parameter space.
7. The method for compensating for the recognition error of inconsistent feature points of crayfish morphology according to claim 6, characterized in that: The method for obtaining the data set in step S2 includes: Data collection: Obtain the position, posture and angle of the crayfish through the camera; Data annotation: Based on the actual position of the crayfish on the belt and the position recognized by the camera, the error in the X and Y directions between the actual position and the position recognized by the camera is annotated; Data cleaning: Clean the collected data, remove unqualified images or data with incorrect annotations, and ensure the quality and availability of the data; Divide the data set and validation set, and use cross-validation: divide the data set into multiple mutually exclusive subsets, select one of the subsets as the validation set in turn, and the remaining subsets as the training set, and perform multiple cross-validations.
8. The method for compensating for the recognition error of inconsistent feature points of crayfish morphology according to claim 6, characterized in that: The evaluation methods of parameter combination performance include: Data partitioning: First, the data set is divided into several mutually exclusive subsets in a certain way, one of which is used as a validation set and the remaining subsets are used as training sets; Model training: For each parameter combination, the model is trained using the training subset. During the training process, the parameters of the model are adjusted according to the parameter combination. Model evaluation: Use the validation subset to evaluate the trained model, and use the accuracy of the output results to measure the performance of the model on the validation set; Performance index statistics: The performance indexes obtained by K cross-validation, including accuracy and error size, are counted to obtain the average performance index; Select the best parameter combination: Based on the average performance index, select the parameter combination with the best performance as the final model parameters.
9. The method for compensating for the recognition error of inconsistent feature points of crayfish morphology according to claim 6, characterized in that: It also includes dynamically adaptively adjusting parameters of the error compensation model, including the following steps: Performance indicator monitoring: During the real-time recognition process, the performance indicators of the model are continuously monitored, including accuracy and error size; Update performance indicators regularly and process a certain number of images; Setting the threshold: Set a threshold to determine whether the model performance reaches the expected level; If the model error exceeds the pre-set threshold in several consecutive cycles, it indicates that the model performance has deteriorated and parameter adjustment is required; Parameter adjustment strategy: Based on the changes in the monitored performance indicators, different parameter adjustment strategies are adopted: increase the compensation parameter when the error increases; reduce the compensation parameter when the error decreases; Parameter adjustment method: Linear adjustment: When the errors of multiple cycles remain unchanged, the parameter values are linearly adjusted for each cycle according to the changes in the monitored performance indicators; Exponential adjustment: When the errors of multiple cycles gradually increase or decrease, the parameter values are adjusted exponentially according to the changes in the monitored performance indicators, so that the adjustment speed increases or decreases over time; Feedback control mechanism: Design a feedback control mechanism to automatically adjust model parameters based on actual recognition results and error conditions.
10. A system for compensating for the recognition error of inconsistent feature points of crayfish morphology, characterized in that: The method according to any one of claims 1 to 9 comprises an image acquisition module, an image processing module, a data optimization module, a data compensation module, and a data correction module; wherein: The image acquisition module is used to acquire the crayfish posture image, and comprises a light source, a camera and an image sensor; The image processing module is used to receive the crayfish posture image acquired by the image acquisition module and preprocess the image; the data optimization module is used to perform error trend analysis on the preprocessed image data and establish a feature point error compensation model; the data compensation module is used to combine the error compensation model with the camera recognition system, and in the real-time recognition process, according to the current position and posture of the crayfish, calculate the compensation parameters through the error compensation model, and add the compensation parameters in the X direction and the Y direction to the X coordinate and the Y coordinate of the camera recognition position respectively, to obtain the corrected position information; The data correction module is used to optimize the static parameters and adaptively adjust the dynamic parameters of the error compensation model, and to make real-time corrections to the camera recognition position.
Citation Information
Patent Citations
Face correction model training method and device, electronic equipment and storage medium
CN112164002A
Data processing method and device, attitude prediction method and device and storage medium
CN113807150A
Crayfish head and tail separation control method and system based on deep learning
CN113869252A
Deep learning-based lobster online positioning visual detection method and system
CN114627181A
Method for improving long-term stability of MEMS accelerometer
CN115047213A
