Marine target detection method based on multi-scale feature fusion
Through the improved InceptionNeXt network and multi-layer feature fusion network, combined with the CBAM attention mechanism and DySample S+, the accuracy problems of mid-scale changes in marine target detection and special weather conditions are solved, achieving more efficient feature extraction and fusion, significantly improving the The accuracy and robustness of offshore target detection.
Patent Information
- Application Number
- CN202410923963.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-12
AI Technical Summary
When the existing maritime target detection technology deals with large changes in the maritime target scale and special weather conditions, there are missed or misdetection phenomena, and the multi-scale fusion network is not deep enough, resulting in low detection accuracy, especially for feature information of very small targets. Lost.
Using a multi-scale feature fusion method, the first multi-scale feature fusion is performed through the improved InceptionNeXt network and the multi-layer efficient re-parameterized generalized feature pyramid network, and the second fusion is performed through the multi-layer adaptive structural feature fusion network. , combined with CBAM attention mechanism and DySample S+ upsampling, enhance the ability to identify multi-scale targets.
It improves the accuracy and robustness of maritime target detection, effectively suppresses unnecessary information, enhances the ability to identify multi-scale targets in complex backgrounds, and significantly improves the detection effect.
Smart Images

Figure CN118941941A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of marine target detection, and in particular to a marine target detection method based on multi-scale feature fusion. Background Art
[0002] At present, the application scenarios of marine target detection technology are becoming more and more extensive. For example, in marine fishery management, fishing vessels need to be monitored and dispatched in real time; in marine traffic supervision, the navigation trajectory of ships needs to be tracked and warned in real time; in marine environmental monitoring, marine pollution and marine ecology need to be continuously observed and analyzed. These application scenarios have put forward higher requirements for marine target detection technology.
[0003] Although the marine target detection method based on deep learning technology can realize the recognition and positioning of various marine targets by learning and analyzing a large amount of image data, the scale of marine targets varies greatly. At a distance, the marine targets occupy a small area of image pixels, and there are fewer features that can be used to identify the targets. At a close distance, targets of different sizes occlude each other, and some feature information is lost. In special weather conditions, such as foggy scenes, marine targets become blurred and difficult to identify.
[0004] Based on this, the solution proposed in the prior art is to adopt or utilize a multi-scale fusion network to fuse feature information. However, there are two issues that are not taken into consideration:
[0005] First, although the powerful feature extraction network can enrich image features, it also extracts unnecessary noise, resulting in missed detection or false detection.
[0006] Secondly, due to the large scale span of marine targets, the multi-scale fusion network is not deep enough, the feature fusion is not complete enough, and the feature information of very small marine targets is lost. These problems lead to the low accuracy of marine target detection in existing technologies. Summary of the invention
[0007] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a marine target detection method based on multi-scale feature fusion to improve the detection accuracy and robustness of marine targets.
[0008] The purpose of the present invention can be achieved by the following technical solutions:
[0009] A method for detecting marine targets based on multi-scale feature fusion includes the following steps:
[0010] Acquire marine target images and perform image preprocessing;
[0011] The preprocessed marine target image is input into the feature extraction network to obtain image features of different levels and scales;
[0012] Through a multi-layer efficient re-parameterized generalized feature pyramid network, the first multi-scale feature fusion is performed on each image feature output by the feature extraction network to obtain multiple pyramid network fusion features;
[0013] Through the multi-layer adaptive structure feature fusion network, each pyramid network fusion feature is subjected to a second multi-scale feature fusion to obtain multiple adaptive network fusion features;
[0014] The fusion features of each adaptive network are input into the classification and regression network to obtain the category and location information of the maritime target.
[0015] Furthermore, the feature extraction network is an improved InceptionNeXt network, comprising a P1 stage, a P2 stage, a P3 stage, a P4 stage and a P5 stage connected in sequence, and the outputs of the P2 stage, the P3 stage, the P4 stage and the P5 stage are respectively used as inputs of a multi-layer efficient reparameterized generalized feature pyramid network.
[0016] Furthermore, the P1 stage includes a Conv module, the P2 stage includes three InceptionNeXt Block modules connected in sequence, the P3 stage includes a Conv module and three InceptionNeXt Block modules connected in sequence, the P4 stage includes a Conv module and nine InceptionNeXt Block modules connected in sequence, and the P5 stage includes a Conv module, three InceptionNeXt Block modules and an SPPF module connected in sequence.
[0017] Furthermore, the InceptionNeXt Block module includes a Spilt operation, four parallel branches, a Concat operation, a CBAM attention mechanism, a batch normalization layer and an MLP layer connected in sequence. The input of the InceptionNeXt Block module is also connected to the MLP layer. Each parallel branch is a depth-separable convolution of three convolution kernels of different sizes and an identity mapping. The CBAM attention mechanism is used to achieve attention to key information and suppression of unnecessary information.
[0018] Furthermore, the SPPF module includes a head-end Conv module, a Concat operation and a tail-end Conv module connected in sequence, and three parallel branches are arranged between the head-end Conv module and the Concat operation, and each parallel branch is respectively provided with a MaxPool layer of different sizes.
[0019] Further, the multi-layer efficient re-parameterized generalized feature pyramid network is a four-layer efficient re-parameterized generalized feature pyramid network, including a first stage, a second stage, a third stage, a fourth stage, a fifth stage, a sixth stage and a seventh stage connected in sequence;
[0020] The first stage, the second stage and the third stage all include a Concat layer, a CSPStage module and a DySample S+ module connected in sequence, wherein the Concat layer of the first stage is respectively connected to the output of the P4 stage after being processed by a Conv module and the output of the P5 stage; the Concat layer of the second stage is respectively connected to the output of the P3 stage after being processed by a Conv module, the output of the first stage and the output of the P4 stage; the Concat layer of the third stage is respectively connected to the output of the P2 stage after being processed by a Conv module, the output of the second stage and the output of the P3 stage;
[0021] The fourth stage, the fifth stage and the sixth stage all include a Concat layer, a CSPStage module and a Conv module connected in sequence. The Concat layer of the fourth stage is respectively connected to the output of the P2 stage and the output of the third stage; the Concat layer of the fifth stage is respectively connected to the output of the fourth stage and the output of the CSPStage module in the third stage; the Concat layer of the sixth stage is respectively connected to the output of the CSPStage module in the third stage, the processing result of a Conv module, the output of the fifth stage and the output of the CSPStage module in the second stage, and the CSPStage module in the sixth stage is also connected to the Concat layer of the second stage; the Concat layer of the seventh stage is respectively connected to the output of the Concat layer of the second stage, the processing result of a Conv module, the output of the CSPStage module in the first stage and the output of the sixth stage.
[0022] Furthermore, the multi-layer adaptive structural feature fusion network is a four-layer adaptive structural feature fusion network, including an ASFF-1 branch, an ASFF-2 branch, an ASFF-3 branch and an ASFF-4 branch. The ASFF-1 branch, the ASFF-2 branch, the ASFF-3 branch and the ASFF-4 branch are respectively connected to the outputs of the CSPStage modules in the fourth stage, the fifth stage, the sixth stage and the seventh stage, and feature fusion is performed to obtain corresponding adaptive network fusion features.
[0023] Furthermore, in the process of feature fusion of each branch of the four-layer adaptive structure feature fusion network, a corresponding weight is assigned to each feature, and each weight is obtained through adaptive learning.
[0024] Furthermore, the classification regression network includes multiple detection head structures, each detection head structure processes the corresponding adaptive network fusion features respectively, and each detection head structure includes a regression branch and a prediction branch. The regression branch includes a Conv module, a convolution module and a CIOU loss function connected in sequence; the prediction branch includes a Conv module, a convolution module and a BCE loss function connected in sequence.
[0025] Furthermore, the calculation expression of the CIOU loss function is:
[0026]
[0027]
[0028] Where CIOU is the calculation result of CIOU loss function, B gt is the area of the real box, B prd is the area of the prediction box, ρ 2 (B gt ,B prd ) is the distance between the center of the real box and the predicted box, w c and h c is the width and height of the smallest enclosing box covering these two boxes. IOU, α, and υ are all intermediate quantities. prd 、w prd are the height and width of the prediction box, respectively. gt and w gt are the height and width of the real frame respectively;
[0029] The calculation expression of the BCE loss function is:
[0030]
[0031] Where BCE is the calculation result of BCE loss function, y i is a binary label with a value of 0 or 1, p(y i ) represents the probability that sample i is predicted to be a positive class, and N represents the number of samples.
[0032] Compared with the prior art, the present invention has the following advantages:
[0033] (1) The feature extraction network in the present invention, namely the improved InceptionNeXt, has excellent performance. It can effectively extract multi-scale information at different levels in the image and enrich the features of the image. The CBAM attention mechanism is innovatively introduced in the InceptionNeXt block module, which enables the network to focus more on important information while effectively suppressing unnecessary information, thereby improving the accuracy and efficiency of feature extraction.
[0034] (2) The present invention designs a four-layer efficient reparameterized generalized feature pyramid network. Compared with Efficient-RepGFPN, the network has increased depth, which enables the network to more fully exchange high-level semantic information and low-level spatial information, and enhances the recognition ability of multi-scale targets. In the upsampling stage, using DySample S+, not only does it not increase the amount of network calculation, but it also effectively improves the resolution of the image and realizes the first fusion of multi-scale feature information.
[0035] (3) In order to further optimize the feature fusion effect, the present invention proposes a four-layer adaptive structural feature fusion network. Compared with the existing adaptive spatial feature fusion network (ASFF), this network has stronger multi-scale fusion capabilities. It can filter conflicting information spatially, effectively suppress inconsistent information, and enhance the scale invariance of features. It improves the ability to recognize multi-scale targets in complex backgrounds and realizes the second fusion of multi-scale feature information.
[0036] (4) The feature extraction network of the present invention can not only fully extract multi-scale feature information, but also fully utilize the multi-scale information by fusing the multi-scale information twice. This innovative design significantly improves the network's ability to recognize multi-scale targets in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic flow chart of a method for detecting marine targets based on multi-scale feature fusion provided in an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a network structure of a marine target detection method based on multi-scale feature fusion provided in an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of the structure of an InceptionNeXt Block module provided in an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the structure of an SPPF module provided in an embodiment of the present invention;
[0041] Figure 5 The figure is a schematic diagram of the structure of a Conv module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0043] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0045] Example 1
[0046] like Figure 1 As shown, this embodiment provides a method for detecting marine targets based on multi-scale feature fusion, comprising the following steps:
[0047] S1: Acquire marine target images and perform image preprocessing;
[0048] S2: Input the preprocessed marine target image into the feature extraction network to obtain image features of different levels and scales;
[0049] S3: Through a multi-layer efficient re-parameterized generalized feature pyramid network, the first multi-scale feature fusion is performed on each image feature output by the feature extraction network to obtain multiple pyramid network fusion features;
[0050] S4: Through the multi-layer adaptive structure feature fusion network, each pyramid network fusion feature is subjected to a second multi-scale feature fusion to obtain multiple adaptive network fusion features;
[0051] S5: Input the fusion features of each adaptive network into the classification regression network to obtain the category and location information of the maritime target.
[0052] Specifically, the image preprocessing performed in step S1 is adaptive scaling according to a unified standard.
[0053] This embodiment obtains some images from the Singapore Maritime Dataset (SMD). The SMD dataset includes 40 On-Shore videos, 11 On-Board videos, and 30 near-infrared On-Shore videos. There are 10 types of targets in the SMD dataset, namely cargo ships, buoys, swimmers, birds / aircraft, ships, ferries, speedboats, kayaks, sailboats, and others. Since the number of swimmer samples is very small, they are excluded. 35 of the 40 On-Shore videos are selected to form a data set, and 1 image is extracted every 3 frames. The image size is 1920×1080, for a total of 5810 images. All images are labeled using labelImg software. The image is adaptively scaled to 640px×640px×3 to create a VOC format data set and corresponding labels.
[0054] Preferably, in this embodiment, in order to solve the problem of limited number of data sets, color space transformation and salt and pepper noise are used to enhance offline data to enrich the marine target data set, and the data set is divided into training set, validation set and test set in a ratio of 6:2:2; Mosaic and Mixup methods are used to enhance online data during network training to improve the robustness of the training model.
[0055] In step S2, the feature extraction network is an improved InceptionNeXt network, including sequentially connected P1 stage, P2 stage, P3 stage, P4 stage and P5 stage, and the outputs of P2 stage, P3 stage, P4 stage and P5 stage are respectively used as inputs of a multi-layer efficient re-parameterized generalized feature pyramid network.
[0056] The P1 stage includes a Conv module, the P2 stage includes three InceptionNeXt Block modules connected in sequence, the P3 stage includes a Conv module and three InceptionNeXt Block modules connected in sequence, the P4 stage includes a Conv module and nine InceptionNeXt Block modules connected in sequence, and the P5 stage includes a Conv module, three InceptionNeXt Block modules and an SPPF module connected in sequence.
[0057] Specifically, in this embodiment, the P1 stage consists of a convolution layer with a convolution kernel size of 4×4 and a stride of 4, and a BatchNorm batch normalization layer; the P2 stage consists of an identity mapping and three InceptionNeXt Block modules; the P3 stage consists of a BatchNorm batch normalization layer, a convolution layer with a convolution kernel size of 2×2 and a stride of 2, and three InceptionNeXt Block modules; the P4 stage consists of a BatchNorm batch normalization layer, a convolution layer with a convolution kernel size of 2×2 and a stride of 2, and nine InceptionNeXt Block modules; the P5 stage consists of a BatchNorm batch normalization layer, a convolution layer with a convolution kernel size of 2×2 and a stride of 2, three InceptionNeXt Block modules and an SPPF module;
[0058] The InceptionNeXt Block module includes a Spilt operation, four parallel branches, a Concat operation, a CBAM attention mechanism, a batch normalization layer, and an MLP layer connected in sequence. The input of the InceptionNeXt Block module is also connected to the MLP layer. Each parallel branch is a depth-separable convolution of three convolution kernels of different sizes and an identity mapping. The CBAM attention mechanism is used to focus on key information and suppress unnecessary information.
[0059] In this embodiment, Figure 3 As shown in the figure, the InceptionNeXt Block module consists of a Spilt operation, four parallel branches, a Concat operation, a CBAM attention mechanism, a BatchNorm batch normalization layer, and an MLP layer; the CBAM attention mechanism is used to focus on key information and suppress unnecessary information.
[0060] The four parallel branches consist of a 3×3 depth-wise separable convolution, a 1×11 depth-wise separable product, an 11×1 depth-wise separable convolution, and an identity mapping; convolution kernels of different sizes can expand the convolution receptive field and obtain richer features.
[0061] The SPPF module includes a head-end Conv module, a Concat operation and a tail-end Conv module which are connected in sequence. Three parallel branches are arranged between the head-end Conv module and the Concat operation, and each parallel branch is respectively provided with a MaxPool layer of different sizes.
[0062] In this embodiment, Figure 4As shown in the figure, the SPPF module consists of two Conv modules, three MaxPool layers, and one Concat operation; the SPPF module can capture important image feature information.
[0063] like Figure 5 As shown in the figure, the Conv module consists of a normal convolution layer, a BatchNorm batch normalization layer, and a SiLU activation function.
[0064] In step S3, the multi-layer efficient reparameterized generalized feature pyramid network is a four-layer efficient reparameterized generalized feature pyramid network. The depth is increased on the basis of the efficient reparameterized generalized feature pyramid network Efficient-RepGFPN, with a total of four layers. Compared with Efficient-RepGFPN, it inputs feature information of more scales; uses denser connecting lines for the interaction of feature information at different layers; adopts the DySample S+ lightweight upsampling operator, which can improve the image resolution without increasing the additional computational burden; the four-layer efficient reparameterized generalized feature pyramid network includes a Conv module, a Concat operation, a CSPStage module, a DySample S+ module and some connecting lines. The network fuses multi-scale features for the first time and outputs four fused features.
[0065] The above connecting lines are arranged from top to bottom and from left to right, and the features of different levels and scales are integrated using the connecting lines.
[0066] Specifically, it includes the first stage, the second stage, the third stage, the fourth stage, the fifth stage, the sixth stage and the seventh stage connected in sequence;
[0067] The first stage, the second stage and the third stage all include a Concat layer, a CSPStage module and a DySample S+ module connected in sequence. The Concat layer of the first stage connects the output of the P4 stage through a Conv module and the output of the P5 stage; the Concat layer of the second stage connects the output of the P3 stage through a Conv module, the output of the first stage and the output of the P4 stage; the Concat layer of the third stage connects the output of the P2 stage through a Conv module, the output of the second stage and the output of the P3 stage;
[0068] The fourth stage, the fifth stage and the sixth stage all include a Concat layer, a CSPStage module and a Conv module connected in sequence. The Concat layer of the fourth stage is respectively connected to the output of the P2 stage and the output of the third stage; the Concat layer of the fifth stage is respectively connected to the output of the fourth stage and the output of the CSPStage module in the third stage; the Concat layer of the sixth stage is respectively connected to the output of the CSPStage module in the third stage after being processed by a Conv module, the output of the fifth stage and the output of the CSPStage module in the second stage, and the CSPStage module in the sixth stage is also connected to the Concat layer of the second stage; the Concat layer of the seventh stage is respectively connected to the output of the Concat layer of the second stage after being processed by a Conv module, the output of the CSPStage module in the first stage and the output of the sixth stage.
[0069] Equivalent to, Figure 1 As shown in the figure, the four-layer efficient re-parameterized generalized feature pyramid consists of 7 Concat layers, 7 CSPStage modules, 8 Conv modules and 3 upsampling operations. Among them, the network layers connected by Concat_1, Concat_2, Concat_3, Concat_4, and Concat_5 are (9, 10), (6, 13, 14), (4, 17, 18), (20, 24), and (16, 27, 28) respectively. DySample S+ is used for upsampling operations. CSPStage4, CSPStage5, CSPStage6, and CSPStage7 output the semantic features of Level1, Level2, Level3, and Level4 respectively, completing the first multi-scale feature fusion.
[0070] In step S4, the multi-layer adaptive structural feature fusion network is a four-layer adaptive structural feature fusion network with four branches. A branch is extended on the basis of the adaptive structural feature fusion network (Adaptively Spatial Feature Fusion, ASFF) to fuse features of four scales. Each branch receives the fused features output by the four-layer efficient parameterized generalized feature pyramid network, then filters the features, and fuses the filtered features of different scales for the second time to obtain four fused features.
[0071] Specifically, it includes ASFF-1 branch, ASFF-2 branch, ASFF-3 branch and ASFF-4 branch. The ASFF-1 branch, ASFF-2 branch, ASFF-3 branch and ASFF-4 branch are respectively connected to the output of the CSPStage module in the fourth stage, the fifth stage, the sixth stage and the seventh stage, and perform feature fusion to obtain the corresponding adaptive network fusion features.
[0072] During the feature fusion process of each branch of the four-layer adaptive structure feature fusion network, corresponding weights are assigned to each feature, and each weight is obtained through adaptive learning.
[0073] like Figure 1 As shown in the figure, the output of each branch of the four-layer adaptive structure feature fusion network corresponds to the result of multiplying and adding the semantic features of Level 1, Level 2, Level 3 and Level 4 with the weights. Taking ASFF-1 as an example, the calculation formula for the other branches is as follows:
[0074] ASFF-1=α 1 ·x 1→1 +β 1 ·x 2→1 +γ 1 ·x 3→1 +δ 1 ·x 4→1
[0075] Among them, x 2→1 Indicates that the feature map of Level2 is adjusted to the size of Level1, x 3→1 and x 4→1 Similarly. 1 , β 1 , γ 1 and δ 1 is learned through network adaptation. Their constraints are α 1 +β 1 +γ 1 +δ 1 =1 and α 1 , β 1 , γ 1 ,δ 1 ∈[0,1],α 1 is defined as:
[0076]
[0077] in Through 1×1 convolution, act on x respectively n→1 Get, through back-propagation update learning, β 1 , γ 1 and δ 1Same reason.
[0078] After the four branches ASFF-1, ASFF-2, ASFF-3, and ASFF-4 output results, the second multi-scale feature fusion is completed.
[0079] In step S5, the classification regression network includes multiple detection head structures, each detection head structure processes the corresponding adaptive network fusion features respectively, and each detection head structure includes a regression branch and a prediction branch. The regression branch includes a Conv module, a convolution module and a CIOU loss function connected in sequence; the prediction branch includes a Conv module, a convolution module and a BCE loss function connected in sequence.
[0080] like Figure 1 As shown, the classification regression network in this embodiment has four detection head structures, each detection head has two branches, a regression branch and a prediction branch;
[0081] The regression branch consists of a Conv module, a common convolution and a CIOU loss function to locate the target at sea. The calculation formula of the CIOU loss function is as follows:
[0082]
[0083] Among them, B gt is the area of the real box, B prd is the area of the prediction box. 2 (B gt ,B prd ) represents the distance between the centers of the two boxes, w c and h c is the width and height of the smallest enclosing box covering these two boxes. The height and width of the predicted box and the true box are h respectively. prd 、w prd 、h gt and w gt .
[0084] The classification branch consists of a Conv module, a common convolution and a BCE loss function to identify marine targets. The BCE loss function calculation formula is as follows:
[0085]
[0086] Among them, y i is a binary label 0 or 1, p(y i ) represents the probability that sample i is predicted to be a positive class, and N represents the number of samples.
[0087] In this embodiment, for model training, hyperparameters are set for the target detection method based on multi-scale fusion, the number of iterations epoch is set to 1000, the patience is set to 50, and the model is limited to stop training early if there is no improvement in 50 rounds; the batch is set to 16, the number of images in each batch is 16, the imgsz is set to 640, the input image size is set to 640×640px, if the input image size is inconsistent with the standard, the input image is adaptively converted to a size of 640×640px, the initial learning rate learning rate is set to 0.01, the learning rate momentum momentum is set to 0.937, the weight decay coefficient is set to 0.0005, and the stochastic gradient descent (SGD) optimization algorithm is used to make the model converge quickly.
[0088] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A method for detecting marine targets based on multi-scale feature fusion, characterized in that: The following steps are involved: Take the target image at sea and perform image preprocessing; The pre-processed marine target image is input into the feature extraction network to obtain image features of different levels and scales; Through the multi-layer efficient re-parameterized generalized feature pyramid network, the first multi-scale feature fusion is performed on each image feature output by the feature extraction network to obtain multiple pyramid network fusion features; Through the multi-layer adaptive structural feature fusion network, the second multi-scale feature fusion is performed on each pyramid network fusion feature to obtain multiple adaptive network fusion features; The fusion features of each adaptive network are input into the classification and regression network to obtain the category and location information of the maritime target.
2. The method for detecting marine targets based on multi-scale feature fusion according to claim 1, characterized in that: The feature extraction network is an improved InceptionNeXt network, which includes a P1 stage, a P2 stage, a P3 stage, a P4 stage and a P5 stage connected in sequence. The outputs of the P2 stage, the P3 stage, the P4 stage and the P5 stage are respectively used as inputs of a multi-layer efficient reparameterized generalized feature pyramid network.
3. The method for detecting marine targets based on multi-scale feature fusion according to claim 2, characterized in that: The P1 stage includes a Conv module, the P2 stage includes three InceptionNeXt Block modules connected in sequence, the P3 stage includes a Conv module and three InceptionNeXt Block modules connected in sequence, the P4 stage includes a Conv module and nine InceptionNeXt Block modules connected in sequence, and the P5 stage includes a Conv module, three InceptionNeXt Block modules and an SPPF module connected in sequence.
4. The method for detecting marine targets based on multi-scale feature fusion according to claim 3, characterized in that: The InceptionNeXt Block module includes a Spilt operation, four parallel branches, a Concat operation, a CBAM attention mechanism, a batch normalization layer and an MLP layer connected in sequence. The input of the InceptionNeXt Block module is also connected to the MLP layer. Each parallel branch is a depth-separable convolution of three convolution kernels of different sizes and an identity mapping. The CBAM attention mechanism is used to achieve focus on key information and suppression of unnecessary information.
5. The method for detecting marine targets based on multi-scale feature fusion according to claim 3, characterized in that: The SPPF module includes a head-end Conv module, a Concat operation, and a tail-end Conv module connected in sequence. Three parallel branches are provided between the head-end Conv module and the Concat operation, and each parallel branch is provided with a MaxPool layer of different sizes.
6. The method for detecting marine targets based on multi-scale feature fusion according to claim 3, characterized in that: The multi-layer efficient re-parameterized generalized feature pyramid network is a four-layer efficient re-parameterized generalized feature pyramid network, including a first stage, a second stage, a third stage, a fourth stage, a fifth stage, a sixth stage and a seventh stage connected in sequence; The first stage, the second stage, and the third stage all include a Concat layer, a CSPStage module, and a DySample S+ module connected in sequence. The Concat layer of the first stage is respectively connected to the output of the P4 stage after being processed by a Conv module and the output of the P5 stage; the Concat layer of the second stage is respectively connected to the output of the P3 stage after being processed by a Conv module, the output of the first stage, and the output of the P4 stage; the Concat layer of the third stage is respectively connected to the output of the P2 stage after being processed by a Conv module, the output of the second stage, and the output of the P3 stage; The fourth stage, the fifth stage and the sixth stage all include a Concat layer, a CSPStage module and a Conv module connected in sequence. The Concat layer of the fourth stage is respectively connected to the output of the P2 stage and the output of the third stage; the Concat layer of the fifth stage is respectively connected to the output of the fourth stage and the output of the CSPStage module in the third stage; the Concat layer of the sixth stage is respectively connected to the output of the CSPStage module in the third stage after being processed by a Conv module, the output of the fifth stage and the output of the CSPStage module in the second stage, and the CSPStage module in the sixth stage is also connected to the Concat layer of the second stage; the Concat layer of the seventh stage is respectively connected to the output of the Concat layer of the second stage after being processed by a Conv module, the output of the CSPStage module in the first stage and the output of the sixth stage.
7. The method for detecting marine targets based on multi-scale feature fusion according to claim 6, characterized in that: The multi-layer adaptive structural feature fusion network is a four-layer adaptive structural feature fusion network, including an ASFF-1 branch, an ASFF-2 branch, an ASFF-3 branch and an ASFF-4 branch. The ASFF-1 branch, ASFF-2 branch, ASFF-3 branch and ASFF-4 branch are respectively connected to the outputs of the CSPStage modules in the fourth stage, the fifth stage, the sixth stage and the seventh stage, and perform feature fusion to obtain corresponding adaptive network fusion features.
8. The method for detecting marine targets based on multi-scale feature fusion according to claim 7, characterized in that: During the feature fusion process of each branch of the four-layer adaptive structure feature fusion network, a corresponding weight is assigned to each feature, and each weight is obtained through adaptive learning.
9. The method for detecting marine targets based on multi-scale feature fusion according to claim 7, characterized in that: The classification regression network includes multiple detection head structures, each detection head structure processes the corresponding adaptive network fusion features respectively, and each detection head structure includes a regression branch and a prediction branch. The regression branch includes a Conv module, a convolution module and a CIOU loss function connected in sequence; the prediction branch includes a Conv module, a convolution module and a BCE loss function connected in sequence.
10. The method for detecting marine targets based on multi-scale feature fusion according to claim 9, characterized in that: The calculation expression of the CIOU loss function is: Where, CIOU is the calculation result of CIOU loss function, B gt is the area of the real box, B prd is the area of the prediction box, ρ 2 (B gt ,B prd ) is the distance between the center of the real box and the predicted box, w c and h c is the width and height of the smallest enclosing box covering these two boxes, IOU, α and υ are all intermediate quantities, h prd 、w prd are the height and width of the prediction box, h gt and w gt are the height and width of the real frame respectively; The calculation expression of the BCE loss function is: Where BCE is the calculation result of BCE loss function, y i It is a binary label with a value of 0 or 1, p(y i ) represents the probability that sample i is predicted to be positive, and N represents the number of samples.
