Ship-borne intelligent swimming crab sorting model based on deep learning
Through the deep learning-based onboard intelligent sorting model for swimming crabs, the problem of insufficient detection accuracy of swimming crabs under complex sea conditions has been solved, and accurate counting and weight calculation of swimming crabs have been achieved, thereby improving the detection accuracy and resource assessment capabilities of fishing operations.
Patent Information
- Application Number
- CN202510712761.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-05-30
AI Technical Summary
Existing swimming crab sorting methods have statistical biases and cannot achieve refined quality classification under complex sea conditions. Traditional image processing methods have low accuracy, and deep learning models are not adaptable enough in actual fishing scenarios, making it difficult to accurately detect small target swimming crabs.
A deep learning-based onboard intelligent sorting model for swimming crabs is adopted, including an onboard intelligent detection model, a weight calculation model and a real-time counting system. The YOLO-DFAM model and the improved ByteTrack tracking algorithm are used, combined with the FocalModulation module, ASF-YOLO module, dynamic scale calibration, multi-frame confidence update, exponentially weighted moving average filtering, motion compensation and other technologies to improve detection accuracy and weight calculation accuracy.
Accurately counting swimming crabs of various sizes in complex sea conditions, calculating their weight and evaluating fishing intensity and resource abundance improves detection accuracy and robustness and reduces false detection and missed detection rates.
Smart Images

Figure CN120635144A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sorting models, and in particular relates to a swimming crab ship-borne intelligent sorting model based on deep learning. Background Art
[0002] The current practical challenge in sorting swimming crabs lies in the fact that traditional manual weighting methods suffer from statistical bias and are unable to accurately categorize the quality of the catch. In recent years, automated detection systems based on computer vision have gradually replaced manual weighting (Li et al., 2025). For example, electronic monitors have been used to replace traditional manual monitoring methods for measuring fishing intensity for aquatic products such as hair shrimp and fish (Y. Sun et al., 2024). However, intelligent grading systems based on quality (e.g., weight and size) are still lacking for high-value species such as swimming crabs. Existing deep learning weight measurement methods for swimming crabs are mostly trained and tested in laboratory environments (Chen et al., 2025), lacking adaptability to real-world fishing scenarios. In real-world applications, the complex backgrounds and dynamic changes on conveyor belts of fishing vessels, such as waves and varying lighting, place higher demands on the robustness and accuracy of the models. Therefore, how to effectively apply deep learning models to real-world fishing scenarios and solve the problem of detecting small objects in complex backgrounds has become a hot topic and a challenge in current research.
[0003] The main technical approaches for fishing operation detection in China and abroad include traditional image processing methods such as background extraction (Liu et al., 2024), edge detection (Zheng et al., 2024), and morphological processing (Zhao, Qin, Xu, Yu, & Chen, 2025). These methods generally have low accuracy, are easily affected by ambient lighting and noise, and are prone to missing or misdetecting small targets (such as swimming crabs) in complex scenes. Alternatively, deep learning methods, such as convolutional neural networks (CNNs), can achieve precise detection and tracking of fishing targets, significantly improving accuracy compared to traditional methods. Summary of the Invention
[0004] In view of the above-mentioned deficiencies in the existing technology, the purpose of the invention is to provide a deep learning-based intelligent sorting model for swimming crabs on board ships, which effectively improves the detection accuracy of swimming crabs under complex sea conditions. It can not only accurately count swimming crabs of various sizes, but also calculate the weight of swimming crabs and evaluate fishing intensity and resource richness.
[0005] The present invention proposes a deep learning-based intelligent sorting model for swimming crabs on board, which includes an onboard intelligent detection model, a weight calculation model and a real-time counting system.
[0006] The shipboard intelligent detection model is used to detect whether it is a swimming crab. If the detection result is a swimming crab, the total carapace width of the swimming crab is measured;
[0007] The weight calculation model is used to update the total carapace width of the swimming crab, determine the weight of the swimming crab according to the updated total carapace width of the swimming crab, and grade the swimming crab according to the weight;
[0008] A real-time counting system is used to count swimming crabs in different weight classes;
[0009] The shipborne intelligent detection model is the YOLO-DFAM model, which integrates the FocalModulation module and the ASF-YOLO module. The ASF-YOLO module integrates attention scale fusion into the YOLO framework.
[0010] The weight calculation model also includes: a dynamic scale calibration module and a multi-frame confidence update module;
[0011] The real-time counting system improves the ByteTrack tracking algorithm, which includes: an exponentially weighted moving average filtering module, an angle data processing module, a motion compensation module, and a dynamic confidence threshold adjustment module based on target size and local density. The motion compensation module adopts particle filtering and local motion compensation technology based on optical flow.
[0012] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the FocalModulation module includes:
[0013] Multi-scale deep convolution captures contextual features from local details to global semantics, constructing a pyramid-like multi-granularity representation;
[0014] The dynamic gate generator is used to achieve adaptive fusion of cross-scale features. During the adaptive fusion process, selection weights are generated based on the spatial-channel dual attention mechanism, enabling the YOLO-DFAM model to focus on key areas.
[0015] Element-wise affine transformation injects original features from local details to contextual features of global semantics.
[0016] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the ASF-YOLO module includes:
[0017] The multi-scale characteristics of swimming crabs in various scenes on the deck are captured through the scale sequence feature fusion module;
[0018] The triple feature encoder module fuses deep and shallow features;
[0019] The channel-position attention mechanism dynamically focuses on the blue-gray carapace area and joint key points of the swimming crab.
[0020] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the dynamic scale calibration module includes:
[0021] Setting multiple sets of calibration point data in the vertical direction of the video frame, and establishing pixel-to-centimeter conversion relationships for the multiple sets of calibration point data;
[0022] The multiple sets of calibration point data after the conversion relationship is established are input into the cubic spline interpolator to construct the proportional function of the continuous space.
[0023] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the multi-frame confidence update module includes:
[0024] Comparison of confidence scores for the same swimming crab in consecutive frames;
[0025] When the comparison result shows that the confidence of the same swimming crab in the current frame is higher than the confidence of the same swimming crab in the previous frame, the full carapace width and weight of the swimming crab are updated according to the corresponding image of the current frame.
[0026] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the model formula for determining the weight of swimming crabs according to the updated total carapace width of swimming crabs is:
[0027] W=a×(L) b
[0028]
[0029] Where L represents the updated carapace width of the swimming crab, a=0.0514±0.0008, b=3.0158±0.0123, W obs represents the actual measured weight of swimming crab, W represents the weight prediction value output by the model, represents the average value of the actual measured weight of swimming crabs, R 2 represents the coefficient of determination, which is the coefficient for evaluating the swimming crab weight model, i=1...n, represents the number of swimming crabs.
[0030] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the exponentially weighted moving average filter module includes:
[0031] In each frame, the coordinates of the four corners of the current detection frame, the center coordinates of the detection frame and the smoothed estimate value of the previous frame are weighted and fused according to the set smoothing coefficient to smoothly update the center coordinates, width and height of the target swimming crab.
[0032] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the angle data processing module includes:
[0033] The continuous frame smoothing technology is used for the rotation angle, and the angle data is processed by rolling window or exponentially weighted moving average filtering.
[0034] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the motion compensation module includes:
[0035] The particle filter generates multiple possible states based on the historical motion trajectory. By assigning weights to the coordinates of the four corners of the detection frame in the current frame and the center coordinates of the detection frame, the possible position of the target swimming crab in the next frame is predicted.
[0036] Local motion compensation calls the image processing function to estimate the actual movement of the target swimming crab based on the displacement of pixels in the target area of adjacent frames, and makes real-time corrections to the position of the detection frame in the current frame.
[0037] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs onboard, the working method of the dynamic confidence threshold adjustment module based on target size and local density includes:
[0038] When the coordinates of the four corners of the detection frame of each target swimming crab and the center coordinates of the detection frame are extracted, it is determined whether it is a swimming crab. In the process of determining whether it is a swimming crab, the size information and density information are combined to dynamically adjust whether to track the corresponding swimming crab.
[0039] The beneficial effects of the present invention are as follows: the present invention proposes a swimming crab ship-borne intelligent sorting model based on deep learning, comprising: a ship-borne intelligent detection model, a weight calculation model and a real-time counting system. The ship-borne intelligent detection model is used to detect whether it is a swimming crab. If the detection result is a swimming crab, the full carapace width of the swimming crab is detected; the weight calculation model is used to update the full carapace width of the swimming crab, determine the weight of the swimming crab according to the updated full carapace width of the swimming crab, and classify the swimming crab according to the weight; the real-time counting system is used to count swimming crabs of different weight grades; wherein the ship-borne intelligent detection model is a YOLO-DFAM model, which is integrated into the YOLO-DFAM model. The FocalModulation module and the ASF-YOLO module integrate the attention scale fusion into the YOLO framework. The weight calculation model also includes a dynamic scale calibration module and a multi-frame confidence update module. The real-time counting system is an improved ByteTrack tracking algorithm. The improved ByteTrack tracking algorithm includes an exponentially weighted moving average filter module, an angle data processing module, a motion compensation module, and a dynamic confidence threshold adjustment module based on target size and local density. The motion compensation module uses particle filtering and local motion compensation technology based on optical flow. This invention effectively improves the detection accuracy of swimming crabs in complex sea conditions. It can not only accurately count swimming crabs of various sizes, but also calculate the weight of swimming crabs and assess fishing intensity and resource abundance. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are only for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. Throughout the drawings, the same reference numerals represent the same components. Obviously, the drawings described below are only some of the embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings.
[0041] Figure 1 A schematic diagram of a deep learning-based onboard intelligent sorting model for swimming crabs provided in an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a working method of a FocalModulation module provided in an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of the working method of an ASF-YOLO module provided in an embodiment of the present invention;
[0044] Figure 4 A schematic diagram of the working method of the dynamic scale calibration module provided in an embodiment of the present invention;
[0045] Figure 5A schematic diagram of the working method of the multi-frame confidence update module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present invention.
[0047] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.
[0048] In the description of this invention, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "mounted," "connected," and "connected" should be interpreted broadly, meaning, for example, fixed, removable, or integral; mechanical or electrical; direct or indirect through an intermediary; and internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in this invention on a case-by-case basis.
[0049] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of methods and systems consistent with certain aspects of the present invention, as detailed in the appended claims.
[0050] This invention proposes a deep learning-based intelligent onboard sorting model for swimming crabs, which effectively improves the detection accuracy of swimming crabs under complex sea conditions. It can not only accurately count swimming crabs of various sizes, but also calculate the weight of swimming crabs and evaluate fishing intensity and resource richness.
[0051] Model embodiment
[0052] Figure 1 A schematic diagram of a deep learning-based intelligent onboard sorting model for swimming crabs provided in an embodiment of the present invention.
[0053] The present invention proposes a deep learning-based intelligent sorting model for swimming crabs on board, comprising: an onboard intelligent detection model 11, a weight calculation model 12, and a real-time counting system 13.
[0054] The ship-borne intelligent detection model 11 is used to detect whether it is a swimming crab. If the detection result is a swimming crab, the total carapace width of the swimming crab is detected.
[0055] Specifically, in the embodiment of the present invention, the shipborne intelligent detection model 11 detects whether it is a swimming crab. If the detection result is a swimming crab, the detection principle of the full carapace width of the swimming crab is described in detail below.
[0056] The weight calculation model 12 is used to update the total carapace width of the swimming crab, determine the weight of the swimming crab according to the updated total carapace width of the swimming crab, and grade the swimming crab according to the weight.
[0057] Specifically, in an embodiment of the present invention, the full carapace width detected by the shipborne intelligent detection model 11 is not very accurate. The weight calculation model 12 further detects and updates the full carapace width of the swimming crab to improve the accuracy of the full carapace width detection. The weight calculation model updates the full carapace width of the swimming crab, determines the weight of the swimming crab based on the updated full carapace width of the swimming crab, and grades the swimming crabs according to their weight. The principle is described in detail below.
[0058] The real-time counting system 13 is used to count swimming crabs of different weight grades.
[0059] Specifically, in an embodiment of the present invention, the real-time counting system 13 can classify swimming crabs according to their weight into three levels: >150g, 100-150g, and <100g. The real-time counting system 13 can count swimming crabs of different weight levels, such as: >150g is 230, 100-150g is 355, and <100g is 130. In some embodiments, it can also be divided into four levels or five levels, but this does not limit the scope of protection of the present invention.
[0060] Among them, the shipborne intelligent detection model 11 is a YOLO-DFAM model, which integrates a FocalModulation module 101 and an ASF-YOLO module 102. The ASF-YOLO module 102 integrates attention scale fusion into the YOLO framework;
[0061] The weight calculation model 12 further includes: a dynamic scale calibration module 103 and a multi-frame confidence updating module 104;
[0062] The real-time counting system 13 is an improved ByteTrack tracking algorithm, which includes: an exponentially weighted moving average filtering module 105, an angle data processing module 106, a motion compensation module 107, and a dynamic confidence threshold adjustment module 108 based on target size and local density. The motion compensation module 107 adopts particle filtering and local motion compensation technology based on optical flow.
[0063] Specifically, in an embodiment of the present invention, the FocalModulation module can improve the model's ability to detect small swimming crabs and distinguish dense targets in complex scenes. The ASF-YOLO module effectively captures the multi-scale characteristics of swimming crabs in complex scenes on the deck, such as the details of the crab's carapace in the foreground and the crab's body outline in the distance, enhancing robustness to degraded information such as crab leg breakage and blurred carapace texture. DFDM stands for DualFocus Dynamic Modulation. The dynamic scale calibration module can improve the measurement accuracy of carapace width. The multi-frame confidence update module reduces the target tracking trajectory breakage rate. The exponentially weighted moving average filter module reduces detection noise and drastic changes caused by local motion. The angle data processing module addresses the problem of drastic fluctuations in the detection frame angle when the swimming crab rotates rapidly. The motion compensation module effectively alleviates position deviations caused by rapid motion or local occlusion. The dynamic confidence threshold adjustment module based on target size and local density ensures that all levels of swimming crabs can be accurately tracked. The specific implementation method is described in detail below.
[0064] Figure 2 A schematic diagram of a working method of a FocalModulation module provided in an embodiment of the present invention.
[0065] Furthermore, in the above-mentioned intelligent sorting model for swimming crabs on board based on deep learning, Figure 2 The working method of the FocalModulation module includes three steps from S21 to S23:
[0066] S21: Multi-scale deep convolution captures contextual features from local details to global semantics, and constructs pyramid-like multi-granularity representations;
[0067] S22: The dynamic gate generator is used to achieve adaptive fusion of cross-scale features. During the adaptive fusion process, selection weights are generated based on the spatial-channel dual attention mechanism, enabling the YOLO-DFAM model to focus on key areas.
[0068] S23: Element-wise affine transformation injects original features from local details to global semantic contextual features.
[0069] Specifically, in an embodiment of the present invention, FocalModulation innovates the traditional attention paradigm through a three-stage mechanism of focus contextualization-gated aggregation-affine transformation. Unlike the fully connected interaction of the self-attention mechanism, the FocalModulation module achieves a balance between computational efficiency and modeling capabilities, abandons the computational bottleneck of QKV interaction, and maintains the modeling capability of sensitivity to the direction of rotating targets while reducing video memory consumption.
[0070] It should be understood that spatial attention enhances the positioning accuracy of rotation-sensitive features such as the crab body edge and chelicerae direction; channel attention maintains feature discrimination in occlusion scenarios through dynamic screening of feature channels, such as when the crab body is obscured by a fishing net; Softmax normalization is used instead of Sigmoid in the gated fusion stage, so that the multi-scale feature weights have competitive adjustment characteristics, which are more suitable for actual fishery detection needs.
[0071] Figure 3 A schematic diagram of the working method of the ASF-YOLO module provided in an embodiment of the present invention.
[0072] Furthermore, in the above-mentioned intelligent sorting model for swimming crabs on board based on deep learning, Figure 3 , the working method of the ASF-YOLO module includes three steps from S31 to S33:
[0073] S31: Capturing the multi-scale characteristics of swimming crabs in various scenes on the deck through the scale sequence feature fusion module;
[0074] S32: triple feature encoder module fuses deep and shallow features;
[0075] S33: The channel-position attention mechanism dynamically focuses on the blue-gray carapace area and joint key points of the swimming crab.
[0076] Specifically, in an embodiment of the present invention, the ASF-YOLO module effectively captures the multi-scale characteristics of swimming crabs in complex scenes on the deck through the scale sequence feature fusion SSFF module, such as the details of the swimming crab's carapace in the near distance and the crab's body outline in the distant distance. The triple feature encoder TFE module is used to fuse deep and shallow layer features to enhance the robustness to degraded information such as crab leg breakage and blurred shell texture. The channel-position attention mechanism can dynamically focus on the blue-gray shell area and joint key points unique to swimming crabs, and can still accurately locate the target despite the interference of shells, seaweed and debris.
[0077] Figure 4 A schematic diagram of the working method of the dynamic scale calibration module provided by an embodiment of the present invention.
[0078] Furthermore, in the above-mentioned intelligent sorting model for swimming crabs on board based on deep learning, Figure 4The working method of the dynamic scale calibration module includes two steps S41 to S42:
[0079] S41: setting a plurality of sets of calibration point data in the vertical direction of the video frame, and establishing a pixel-to-centimeter conversion relationship for the plurality of sets of calibration point data.
[0080] Specifically, in the embodiment of the present invention, when shooting the swimming crab sorting conveyor belt, due to the limitation of shooting angle, the width and length of the swimming crab will change when it is close to the camera and far away from the camera. By setting multiple sets of calibration point data in the vertical direction of the video frame, such as 12 sets of calibration point data, with a y-axis coordinate range of 830-1507 pixels, the calibration point data verification adopts a double insurance mechanism to eliminate the x-axis coordinates. r ≤x l The invalid span and abnormal points beyond the image boundary are finally generated into the pixel / cm conversion relationship function as follows:
[0081]
[0082] The pixel / cm conversion relationship function shows nonlinear characteristics in the vertical direction. The conversion coefficient in the top area (y>1400px) is 0.098cm / px, and in the bottom area (y<500px) it is increased to 0.152cm / px, accurately adapting to the scale changes caused by perspective distortion.
[0083] S42: Inputting the multiple sets of calibration point data after the conversion relationship is established into a cubic spline interpolator to construct a proportional function in a continuous space.
[0084] Specifically, in the embodiment of the present invention, multiple sets of calibration point data after the conversion relationship is established are input into a cubic spline interpolator to construct a proportional function of the continuous space as follows:
[0085]
[0086] The stability of the scale function extrapolation in continuous space is ensured by boundary value constraints (S(0)=0.153, S(H)=0.102, where H is the image height). After testing, the dynamic scale calibration module reduces the vertical dimension measurement error from 12.6mm of the fixed scale to 1.8mm, a reduction of 85.7%.
[0087] Figure 5 A schematic diagram of the working method of the multi-frame confidence update module provided in an embodiment of the present invention.
[0088] Furthermore, in the above-mentioned intelligent sorting model for swimming crabs on board based on deep learning, Figure 5 The working method of the multi-frame confidence update module includes two steps S51 to S52:
[0089] S51: Comparison of confidence scores for the same swimming crab in consecutive frames;
[0090] S52: When the comparison result shows that the confidence level of the same swimming crab in the current frame is higher than the confidence level of the same swimming crab in the previous frame, the carapace width and weight of the swimming crab are updated according to the corresponding image of the current frame.
[0091] Specifically, in practical applications, due to the movement of swimming crabs on the conveyor belt, changes in posture and unstable lighting conditions, single-frame detection often results in data fluctuations or errors due to shooting angles or momentary interference. In order to ensure the accuracy of the final measurement data, a multi-frame confidence update module is designed to compare the confidence of the same swimming crab in consecutive frames. When the comparison result shows that the confidence of the same swimming crab in the current frame is higher than the confidence of the same swimming crab in the previous frame, the full carapace width and weight of the swimming crab are updated according to the corresponding image of the current frame. This module can automatically filter out unreliable measurements caused by local occlusion, motion blur and other interference factors, ensuring that the recorded data represents the best detection moment.
[0092] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the model formula for determining the weight of swimming crabs according to the updated total carapace width of swimming crabs is:
[0093] W=a×(L) b
[0094]
[0095] Where L represents the updated carapace width of the swimming crab, a=0.0514±0.0008, b=3.0158±0.0123, W obs represents the actual measured weight of swimming crab, W represents the weight prediction value output by the model, represents the average value of the actual measured weight of swimming crabs, R 2 represents the coefficient of determination, which is the coefficient for evaluating the swimming crab weight model, i=1...n, represents the number of swimming crabs.
[0096] Specifically, in an embodiment of the present invention, the model outputs a predicted value of swimming crab weight through L, a and b, and the average value of multiple predicted values of swimming crab weight, the actual measured weight of swimming crab, and the actual measured weight value of swimming crab are substituted into the formula to obtain R2. The closer R2 is to 1, the more accurate the predicted value of swimming crab weight is.
[0097] Here, a = 0.0514 ± 0.0008 (95% confidence interval), b = 3.0158 ± 0.0123 (95% confidence interval), a and b are model parameters determined through iterative optimization. The error in cross-sea application can lead to errors of thousands of tons in population biomass estimation. Parameter a is a conditional factor, reflecting the nutritional reserves and fatness level of individual swimming crabs. Parameter b is the allometric growth index. Its value close to 3 indicates that the weight growth of swimming crabs in the study area is positively proportional to the cube of the total carapace width, which is consistent with the theoretical expectation of allometric growth of crustaceans.
[0098] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the exponentially weighted moving average filter module includes:
[0099] In each frame, the coordinates of the four corners of the current detection frame, the center coordinates of the detection frame and the smoothed estimate value of the previous frame are weighted and fused according to the set smoothing coefficient to smoothly update the center coordinates, width and height of the target swimming crab.
[0100] Specifically, in an embodiment of the present invention, since swimming crabs frequently wave their legs and claws after entering the scene, traditional detection is prone to problems such as frame size fluctuations and position jitter. An exponentially weighted moving average filtering mechanism is designed. In each frame, the coordinates of the four corners of the current detection frame, the center coordinates of the detection frame and the smoothed estimate of the previous frame are weighted and fused according to the set smoothing coefficient to smoothly update the center coordinates, width and height of the target swimming crab, thereby reducing detection noise and drastic changes caused by local motion.
[0101] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the angle data processing module includes:
[0102] The continuous frame smoothing technology is used for the rotation angle, and the angle data is processed by rolling window or exponentially weighted moving average filtering.
[0103] Specifically, in an embodiment of the present invention, in order to solve the problem of drastic fluctuations in the detection frame angle when the swimming crab rotates rapidly, a module for processing angle data is designed, and continuous frame smoothing technology is used for the rotation angle. The angle data is processed through a rolling window or exponentially weighted moving average filtering method to avoid frequent jumps in the detection frame angle within the range of 0° to 360°, thereby ensuring that the detection frame remains stable and continuous.
[0104] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs on board, the working method of the motion compensation module includes:
[0105] The particle filter generates multiple possible states based on the historical motion trajectory, and predicts the possible position of the target swimming crab in the next frame by assigning weights to the coordinates of the four corners of the detection frame of the current frame and the center coordinates of the detection frame.
[0106] Specifically, in an embodiment of the present invention, a particle filter uses historical motion trajectories to generate multiple possible states. By assigning weights to the coordinates of the four corners of the detection frame of the current frame and the center coordinates of the detection frame, the possible position of the target in the next frame is predicted, thereby effectively completing the trajectory when detection temporarily fails, ensuring that the trajectory continuity can be maintained even if a short-term missed detection occurs.
[0107] Local motion compensation calls the image processing function to estimate the actual movement of the target swimming crab based on the displacement of pixels in the target area of adjacent frames, and makes real-time corrections to the position of the detection frame in the current frame.
[0108] Specifically, in an embodiment of the present invention, local motion compensation estimates the actual movement of the target based on the displacement of pixels in the target area of adjacent frames by calling an image processing function, and corrects the position of the detection frame in real time, thereby effectively alleviating the position deviation caused by rapid motion or local occlusion.
[0109] Furthermore, in the above-mentioned deep learning-based intelligent sorting model for swimming crabs onboard, the working method of the dynamic confidence threshold adjustment module based on target size and local density includes:
[0110] When the coordinates of the four corners of the detection frame of each target swimming crab and the center coordinates of the detection frame are extracted, it is determined whether it is a swimming crab. In the process of determining whether it is a swimming crab, the size information and density information are combined to dynamically adjust whether to track the corresponding swimming crab.
[0111] Specifically, in an embodiment of the present invention, a dynamic confidence threshold adjustment module based on target size and local density is designed to address the problem of missed detection of small targets or overlapping and occluded targets due to low output confidence. The dynamic confidence threshold adjustment module based on target size and local density realizes adaptation to edge targets. When extracting the coordinates of the four corners of the detection frame of the target swimming crab and the center coordinates of the detection frame, it is additionally determined whether it is a swimming crab. In the judgment process, the retention standard is dynamically adjusted based on information such as size and density to ensure that swimming crabs of all levels can be accurately tracked.
[0112] Those skilled in the art will appreciate that although some embodiments described herein include some features and not others included in other embodiments, the combination of features from different embodiments is intended to be within the scope of the invention and to form different embodiments.
[0113] Those skilled in the art will understand that the description of each embodiment has its own focus, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0114] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall fall within the scope defined by the appended claims. The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and such modifications or substitutions shall be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
[0115] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A deep learning-based intelligent sorting model for swimming crabs on board, characterized by: include: Onboard intelligent detection model, weight calculation model and real-time counting system, The shipborne intelligent detection model is used to detect whether it is a swimming crab. If the detection result is a swimming crab, the total carapace width of the swimming crab is detected; The weight calculation model is used to update the total carapace width of the swimming crab, determine the weight of the swimming crab according to the updated total carapace width of the swimming crab, and grade the swimming crab according to the weight; A real-time counting system is used to count swimming crabs in different weight classes; The shipborne intelligent detection model is a YOLO-DFAM model, which integrates a FocalModulation module and an ASF-YOLO module. The ASF-YOLO module integrates attention scale fusion into the YOLO framework. The weight calculation model also includes: a dynamic scale calibration module and a multi-frame confidence update module; The real-time counting system is an improved ByteTrack tracking algorithm, which includes: an exponentially weighted moving average filtering module, an angle data processing module, a motion compensation module, and a dynamic confidence threshold adjustment module based on target size and local density. The motion compensation module adopts particle filtering and local motion compensation technology based on optical flow.
2. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1 is characterized in that: The working methods of the FocalModulation module include: Multi-scale deep convolution captures contextual features from local details to global semantics, constructing a pyramid-like multi-granularity representation; The dynamic gate generator is used to achieve adaptive fusion of cross-scale features. During the adaptive fusion process, selection weights are generated based on the spatial-channel dual attention mechanism, enabling the YOLO-DFAM model to focus on key areas. Element-wise affine transformation injects original features from local details to contextual features of global semantics.
3. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1 is characterized in that: The working methods of the ASF-YOLO module include: The multi-scale characteristics of swimming crabs in various scenes on the deck are captured through the scale sequence feature fusion module; The triple feature encoder module fuses deep and shallow features; The channel-position attention mechanism dynamically focuses on the blue-gray carapace area and joint key points of the swimming crab.
4. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1 is characterized in that: The working method of the dynamic scale calibration module includes: Setting multiple sets of calibration point data in the vertical direction of the video frame, and establishing pixel-to-centimeter conversion relationships for the multiple sets of calibration point data; The multiple sets of calibration point data after the conversion relationship is established are input into the cubic spline interpolator to construct the proportional function of the continuous space.
5. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1 is characterized in that: The working method of the multi-frame confidence update module includes: Comparison of confidence scores for the same swimming crab in consecutive frames; When the comparison result shows that the confidence of the same swimming crab in the current frame is higher than the confidence of the same swimming crab in the previous frame, the full carapace width and weight of the swimming crab are updated according to the corresponding image of the current frame.
6. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1 is characterized in that: The model formula for determining the weight of the swimming crab based on the updated total carapace width of the swimming crab is: W=a×(L) b Where L represents the updated carapace width of the swimming crab, a=0.0514±0.0008, b=3.0158±0.0123, W obs represents the actual measured weight of swimming crab, W represents the weight prediction value output by the model, represents the average value of the actual measured weight of swimming crabs, R 2 represents the coefficient of determination, which is the coefficient for evaluating the swimming crab weight model, i=1...n, represents the number of swimming crabs.
7. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1 is characterized in that: The working method of the exponentially weighted moving average filtering module includes: In each frame, the coordinates of the four corners of the current detection frame, the center coordinates of the detection frame and the smoothed estimate value of the previous frame are weighted and fused according to the set smoothing coefficient to smoothly update the center coordinates, width and height of the target swimming crab.
8. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1 is characterized in that: The working method of the angle data processing module includes: The continuous frame smoothing technology is used for the rotation angle, and the angle data is processed by rolling window or exponentially weighted moving average filtering.
9. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1 is characterized in that: The working method of the motion compensation module includes: The particle filter generates multiple possible states based on the historical motion trajectory. By assigning weights to the coordinates of the four corners of the detection frame in the current frame and the center coordinates of the detection frame, the possible position of the target swimming crab in the next frame is predicted. Local motion compensation calls the image processing function to estimate the actual movement of the target swimming crab based on the displacement of pixels in the target area of adjacent frames, and makes real-time corrections to the position of the detection frame in the current frame.
10. The deep learning-based intelligent sorting model for swimming crabs on board according to claim 1, characterized in that: The working method of the dynamic confidence threshold adjustment module based on target size and local density includes: When the coordinates of the four corners of the detection frame of each target swimming crab and the center coordinates of the detection frame are extracted, it is determined whether it is a swimming crab. In the process of determining whether it is a swimming crab, the size information and density information are combined to dynamically adjust whether to track the corresponding swimming crab.
Citation Information
Patent Citations
SIF gene SNP molecular marker related to growth traits of portunus trituberculatus and application of SIF gene SNP molecular marker
CN116287295A
Noctilucent remote sensing data light-induced fishing boat detection method based on improved YOLOv5 network
CN116310872A
Traffic tracking detection system for view angle of unmanned aerial vehicle
CN118918148A
Road small target detection algorithm based on Real-ESRGAN and improved YOLOv5
CN119445073A
Deep learning-based fish detection model construction method and fish detection method and system
CN119494983A