Discrete edge feature guided remote sensing ship wake rotation detection method and device

By improving the discrete edge feature extraction and contextual attention fusion modules in the YOLOv8n network and combining them with the DPIoU loss function, the accuracy problem of wake detection in remote sensing images is solved, and high-accuracy and robust ship wake rotation detection is achieved.

CN119274080APending Publication Date: 2025-01-07HAINAN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411509716.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing remote sensing imagery methods for detecting ship wake rotation are inaccurate when there is a lot of sea surface clutter or insufficient wake energy, especially for wakes with low aspect ratios, making it difficult for models to accurately determine angles.

Method used

An improved YOLOv8n network is adopted, using the feature extraction module DEF which focuses on discrete edges and the context attention fusion module EGCA, combined with the DPIoU loss function, to improve the accuracy of trail feature extraction and angle prediction.

Benefits of technology

It achieves high-accuracy wake detection under complex sea conditions, reducing the angle prediction error from 15.35° to 7.16°, and has excellent robustness and generalization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274080A_ABST
    Figure CN119274080A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, in particular to a discrete edge feature guided remote sensing ship wake rotation detection method and device, and constructs a discrete edge feature guided rotation detection method. A feature extraction module focused on a discrete edge is constructed, and through a parallel edge branch design, the intensity change of a pixel gradient can be sensed while image space features are captured, so that richer feature representation is obtained. And through a context attention fusion module, context features are adaptively fused, and the global perception capability of the model is effectively improved. Through the diagonal constrained ProbIoU, the description capability of the rotation angle and shape is further enhanced by considering the relative diagonal distance of the minimum circumscribed horizontal rectangle, and the detection capability of the model is further improved by using the strategy, so that the model can better meet the requirements of practical application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a remote sensing ship wake rotation detection method and device guided by discrete edge features. Background Art

[0002] Remote sensing target detection technology plays an important role in ship monitoring. It has a wide range of applications in ship management, auxiliary law enforcement, and monitoring of fishery activities. Remote sensing images can cover a wide range of sea areas, thereby effectively sensing ship activities. Target detection technology can quickly and accurately identify targets in images, providing a powerful tool for ship monitoring. In recent years, with the improvement of satellite resolution and the advancement of computer vision algorithms, the parsing ability of remote sensing images has been significantly improved. However, due to the complexity of the marine environment and the tiny size of ships in remote sensing images, direct detection of ships remains challenging.

[0003] In remote sensing images, ships often occupy fewer pixels and are difficult to accurately identify. In contrast, the wake generated by a ship when sailing occupies a larger area in the remote sensing image and is easier to detect than the ship itself. Ship wake is a phenomenon of disturbing the water surface caused by the sailing of a ship, and its traces can be observed in remote sensing images. Therefore, monitoring ships by detecting ship wakes in remote sensing images has become an effective method.

[0004] Wake detection does not rely on the image information of the ship itself, and can provide effective supplements when the ship target is small, blurred, or blocked, which makes it difficult to directly identify the ship. On the basis of detecting the ship wake, the rotation detection technology can further improve the detection accuracy and provide the possibility for analyzing the morphological characteristics of the wake. After the wake is detected using the rotation detection method, the direction, length, and angle of the wake can be preliminarily determined based on the angle and shape of the prediction box. They can further infer information such as the ship's heading and speed, providing important data support for subsequent ship tracking and trajectory prediction.

[0005] However, there are still some difficulties in the rotation detection of remote sensing wakes, such as Figure 1 As shown in , when the energy of the wake is stronger than the energy of the sea surface clutter, they can be observed in most optical remote sensing images. However, when the wake energy is insufficient or there is a lot of clutter, only a very thin "V-shaped" wake can be observed, and there is almost no texture detail between the angles. Figure 1 As shown in (a)(b), because the trail is thin and lacks texture, it is difficult for the object detection model to fully detect the entire trail.

[0006] For rotation detectors, the additional angle parameter creates problems such as boundary discontinuity and loss calculation complexity, which are well solved by the method based on 2D Gaussian distribution. Figure 1 As shown in (f), for a rotated box with an aspect ratio close to 1, the shape of their 2D Gaussian distribution will be close to a perfect circle. In other words, if there are two square boxes with the same size as the center point, then no matter how much the angle difference between them is, their 2D Gaussian distribution is always the same.

[0007] In summary, identifying wakes in remote sensing images through rotation detection methods can not only effectively monitor ships, but also provide more information about ship navigation. However, when there are a lot of clutter on the sea surface or the wake energy is insufficient, the wake of the ship is not obvious, discontinuous, and lacks texture, which makes it difficult for the model to detect the wake. In addition, for wakes with low aspect ratios, the 2D Gaussian distribution cannot well determine whether the angle predicted by the model is accurate, which is unacceptable for monitoring methods that infer the ship's heading by the wake direction. Summary of the invention

[0008] In view of this, the purpose of the present invention is to propose a discrete edge feature guided remote sensing ship wake rotation detection method and device to solve the problem that the existing ship wake rotation detection is difficult to cope with the detection when there is a lot of sea clutter or the wake energy is insufficient.

[0009] Based on the above purpose, the present invention provides a remote sensing ship wake rotation detection method guided by discrete edge features, comprising the following steps:

[0010] Collect optical remote sensing or SAR images of ship wakes and pre-process the images;

[0011] The ship wake rotation detection is performed on the preprocessed image through the improved YOLOv8n network to obtain the ship wake information;

[0012] In the improved YOLOv8n network, a feature extraction module DEF focusing on discrete edges is used to replace the P1 layer and the P2 layer in the backbone network of the basic YOLOv8n. The feature extraction module DEF extracts the spatial features and the edge features of the preprocessed image respectively through the edge branch and the convolution branch, and combines the spatial features and the edge features of the image to obtain the image features.

[0013] By setting the context attention fusion module EGCA at the end of the feature pyramid, a fusion of high-dimensional features and low-dimensional features is completed before the final detection;

[0014] DPIoU is introduced into the loss function of the YOLOv8n network for IoU calculation.

[0015] Preferably, the pretreatment comprises:

[0016] The image is processed into an 8-bit RGB image, and grayscale equalization and Gaussian smoothing are performed on the image.

[0017] Preferably, in the feature extraction module DEF, the process of extracting edge features through edge branches includes:

[0018] Use the Scharr operator as the edge detection operator, convolve the two 3×3 matrices contained in the Scharr operator with the image matrix respectively to obtain the horizontal and vertical brightness difference approximation, that is, the horizontal and vertical edge detection results G x and G y , G x and G y The edge feature G is obtained by adding the corresponding features.

[0019] Preferably, the formula for convolution with the image matrix is:

[0020]

[0021] Where A represents the input image matrix.

[0022] Preferably, the context attention fusion module EGCA includes an attention branch and an edge branch, wherein the attention branch is used to generate an initial feature importance weight for each channel. Where C, H, and W refer to the number of channels, height, and width, respectively. The edge branch is used to extract edge features G' in parallel. The edge features G' are used as guides to calculate the initial weights of each corresponding channel. Make adjustments, and calculate the adjusted results through the activation function Sigmoid to obtain the usable weight W;

[0023] The low-dimensional feature map and the high-dimensional feature map are adaptively weighted and reorganized using the weight W, and then aggregated and adjusted through a 1×1 convolution to obtain the fusion result F of the high-dimensional feature and the low-dimensional feature.

[0024] Preferably, the edge feature G' is used as a guide to calculate the initial weight of each corresponding channel Adjustments include:

[0025] W pre Concatenate with G' and use the channel shuffle operation to make W pre and G' are grouped in pairs along the channel so that each group has a W pre and G' of its corresponding channel;

[0026] Use Group Conv to convolve each group separately, so that Wpre Adjust according to the guidance of G'.

[0027] Preferably, the edge branch in the context attention fusion module EGCA uses the Sobel operator, and the formula for obtaining the edge feature G' is:

[0028]

[0029] G'=G' x +G' y

[0030] Among them, G' x and G' y They represent the results of horizontal and vertical edge detection respectively, and A represents the input image matrix.

[0031] Preferably, the formula for DPIoU is:

[0032]

[0033] Among them, t(x) is the 2D Gaussian distribution representation of the real box, p(x) is the 2D Gaussian distribution representation of the predicted box, and d t Represents the minimum diagonal distance of the rectangle surrounding the real box, d p Indicates the diagonal distance of the minimum rectangle enclosing the prediction box, k t is an adaptive weighting factor.

[0034] The present invention also provides a remote sensing ship wake rotation detection device guided by discrete edge features, which is used to execute any one of the above-mentioned remote sensing ship wake rotation detection methods guided by discrete edge features.

[0035] Beneficial effects of the present invention: In order to meet the needs of ship wake detection under remote sensing images, the present invention proposes a rotation detection model guided by discrete edge features and constrained by diagonal distance. The model solves the detection difficulties caused by more sea surface clutter, insufficient wake energy, and insensitivity of 2D Gaussian distribution to square-like angles in remote sensing images, and achieves high-accuracy detection in complex sea conditions and dense target scenes. Experimental results show that the rotation detection algorithm developed by the present invention achieves accurate and stable ship wake detection, and has excellent robustness in faint targets and complex backgrounds. The average detection accuracy of this method for optical remote sensing wakes reached 95.1%, and the average error of its angle prediction was reduced from 15.35° to 7.16°. In addition, the excellent performance of the algorithm in SAR images verifies its excellent adaptability and generalization. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 This is a qualitative example of a wake detection scenario and an introduction to the existing problems;

[0038] Figure 2 It is the trail image in the visible light remote sensing image;

[0039] Figure 3 It is a structural diagram of the feature extraction module focusing on discrete edges;

[0040] Figure 4 The structural diagram of the edge-guided contextual attention fusion module;

[0041] Figure 5 This is a diagram showing the changes in the minimum circumscribed horizontal rectangle when the rectangular frame rotates;

[0042] Figure 6 Comparison chart of ProbIoU and DPIoU;

[0043] Figure 7 It is the overall framework diagram of the model of the present invention;

[0044] Figure 8 The following are the detection results of different network methods in simple scenarios;

[0045] Fig. 9 The detection results of different network methods in complex scenarios;

[0046] Fig.10 Detection results of different network methods on the OpenSARWake dataset. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.

[0048] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0049] The embodiment of this specification provides a method for detecting remote sensing ship wake rotation guided by discrete edge features, comprising the following steps:

[0050] Collect optical remote sensing or SAR images of ship wakes and preprocess the images. The models in this invention only accept standard 8-bit RGB images, and the model will automatically crop the input images to 640×640 pixels. That is, all input images will be processed into 640×640 8-bit RGB images;

[0051] The improved YOLOv8n network is used to detect the rotation of ship wakes on the preprocessed images to obtain the position, direction, angle, length and other information of the ship wakes.

[0052] Among them, in the improved YOLOv8n network, a feature extraction module DEF focusing on discrete edges is constructed to replace the P1 layer and P2 layer in the backbone network of the basic YOLOv8n. In optical remote sensing images, ship wakes often have only fuzzy outlines or incomplete textures due to insufficient energy or interference from sea clutter. This causes them to not have continuous textures like targets in natural scenes, so it is more difficult for the neural network to learn the features therein. Therefore, this module of the present invention is intended to more effectively extract the features of the wake, allowing the model to perceive the wake more keenly.

[0053] The present invention Figure 2 The figure shows the tails in visible light remote sensing images. Their contours and textures are almost all composed of multiple discrete lines. This is completely different from images in natural scenes, which are continuous, gradual, and dotted. The tail is discrete, sudden, and linear, and these characteristics are destined to have strong gradient changes.

[0054] Edge detection operators can achieve good results in perceiving changes in image gradients. Image edges refer to places where local characteristics of an image are discontinuous, where information such as pixel values ​​or structures suddenly change. The Scharr operator is a classic discrete differential operator for edge detection that combines Gaussian smoothing and differential derivation. The operator contains two sets of 3×3 matrices. By convolving them with the image, we can obtain approximate horizontal and vertical brightness differences. The formula is shown in (1):

[0055]

[0056] Among them, A represents the input image matrix, G x and G y Respectively represent the results of horizontal and vertical edge detection. Then the present invention will G x and G y The final edge feature map G can be obtained by adding them in place.

[0057] G=G x +G y (2)

[0058] Therefore, the present invention uses the edge operator as one of the components to design a feature extraction module DEF focusing on discrete edges, aiming to improve the model's sensitivity to discrete edge textures unique to the trail. Figure 3 As shown, the present invention uses edge operators as one of the feature extraction branches and combines them with the convolution branch. They will be used as the front-end components of the model to perceive the gradient changes of pixels and the spatial structure of the image in parallel, so as to learn richer image features.

[0059] As the front-end component of the model, the DEF module initially extracts features through convolution with a step size of 2, and then further refines the captured information through edge branches and convolution branches. The convolution branch can effectively extract the spatial features of the image, but it is not sensitive to the contour shape of the image. The edge branch in the module can effectively make up for this deficiency. It can sense the gradient changes of pixels, thereby effectively capturing the contour and texture features composed of discrete lines in the image. Finally, the module aggregates the refined spatial information and edge information to obtain a richer image feature representation, thereby helping the model to understand the image content more comprehensively.

[0060] This embodiment also constructs an edge-guided contextual attention fusion module EGCA and sets it at the end of the feature pyramid to complete a fusion of high-dimensional features and low-dimensional features before the final detection. It enables the model to complete a fusion of high-dimensional features and low-dimensional features before the final detection, preventing the deep network from ignoring low-dimensional edge features. Specifically including:

[0061] In the object detection model, after multiple feature extractions in the backbone network, the image will gradually change from low-dimensional features to high-dimensional features. After these features are fused through the feature pyramid, they will become more abstract semantic information. At this time, the high-dimensional features are very different from the low-dimensional features in terms of form and characteristics. Low-dimensional features provide rich details such as edges and textures, while high-dimensional features provide abstract feature representations through high-level calculations and analysis.

[0062] However, edge operators are difficult to apply in high-dimensional feature maps because high-dimensional features are abstract and irregular, and their gradient mutations do not represent edge features in the image. Therefore, the present invention fuses low-dimensional feature maps containing a large amount of edge information with high-dimensional feature maps, and by fusing feature information with diverse contexts, the model has better generalization capabilities when facing targets of different types and scales.

[0063] Therefore, the present invention designs a three-step context feature fusion module based on the idea of ​​focusing on edge features, which guides the entire fusion process through edge feature information. Specifically, the present invention first uses the attention mechanism to generate the initial feature importance weights for each channel (C, H, W refer to the number of channels, height, and width respectively), and then use the edge features to guide the initial weights to grow into the final weights Finally, the weight is used to perform weighted reorganization on the low-dimensional feature map and the high-dimensional feature map. The structure of the entire EGCA module is as follows: Figure 4 shown.

[0064] Generate initial feature importance weights through attention in the EGCA module At the same time, there is an edge branch that extracts edge features G' in parallel. In the edge branch, the present invention uses the Sobel operator to extract features. Sobel is an edge detection operator very similar to Scharr. It is more conservative than Scharr in the parameters of the convolution matrix, so it has lower sensitivity. This can effectively reduce the noise brought by the high-dimensional feature map. The longitudinal and transverse detection formulas of the Sobel operator can be expressed as formula (3). Where A represents the input image matrix, G' x and G' y Respectively represent the results of horizontal and vertical edge detection.

[0065]

[0066] In order to obtain the final feature importance weight The present invention uses the feature G extracted by the edge branch as a guide, and then performs initial weighting on each corresponding channel. Specifically, the present invention first adjusts W preConcatenate with G', and then use the channel shuffle operation to make W pre and G' are grouped in pairs along the channel. This allows each group to have a W pre and G' of its corresponding channel. After that, the present invention uses GroupConv to convolve each group separately, so that W pre Adjust according to the guidance of G'. Finally, the adjusted result is calculated by the activation function Sigmoid to obtain the final usable weight W. This process can be expressed by formula (4):

[0067] W=Sigmoid(GC n=C (CS[G′,W pre ]))

[0068] Among them, G' is the feature map extracted by the edge branch, W pre is the initial weight obtained by the attention mechanism. CS refers to the channel shuffle operation. GC refers to Group Conv, and its number of groups n is The number of channels C.

[0069] In the third step of the module, the present invention uses weight W to transform the low-dimensional feature map F low And high-dimensional feature map F high Adaptively weighted reorganization. In this process, the present invention also uses a skip connection similar to the residual structure. It alleviates the gradient vanishing and network degradation problems in the neural network by re-inputting the feature map to be fused. Finally, after a 1×1 convolution to complete aggregation and adjustment, the final fusion result F is obtained. The whole process can be expressed by formula (5):

[0070] F=CBS k=1 [F low (W+1)+F high (2-W)]

[0071] Among them, F is the final result of fusion, F low is the low-dimensional feature map of the input, F high is the high-dimensional feature map of the input. W is the feature importance weight obtained by formula (4) CBS k=1 It is a 1×1 convolution.

[0072] The present invention also introduces DPIoU into the loss function of the YOLOv8n network for IoU calculation, which improves the accuracy of the model's angle prediction by considering more comprehensive constraints.

[0073] Specifically, rotated object detection is an important topic in computer vision, especially in remote sensing scenarios. Compared with horizontal boxes, rotated boxes can more accurately describe the pose and position of objects, thereby improving detection accuracy.

[0074] The rotation box has one more angle parameter than the horizontal box, but the angle parameter has the problem of boundary discontinuity. This is because the angle is periodic, and regression-based methods easily lead to prediction results beyond the defined range. The circular smooth label technology (CSL) avoids this problem by converting angle regression into angle classification. However, a new problem of inconsistency between loss (using category loss) and metric (using IoU) will arise. With the development of rotation target detection technology, IoU calculation methods based on 2D Gaussian distribution have been proposed. This type of method is to approximate any rotated rectangle into a 2D Gaussian distribution (inscribed ellipse), and then calculate the mathematical distance between the distributions (Wasserstein distance, Bhattacharyya distance, etc.). They avoid the problems of boundary discontinuity and inconsistent indicators very well.

[0075] A rotated box can be represented as (x0, y0, w, h, θ), which are the coordinates x0 and y0 of the center point of the box, the length w and height h of the box, and the rotation angle θ of the box. To determine a 2D Gaussian distribution, you need to calculate the mean μ and the covariance matrix ∑. Where μ is (x0, y0) T (T refers to the matrix transpose), ∑ has three free quantities a, b, and c, and their conversion with the rotation box parameters can be calculated by formula (6).

[0076]

[0077] Where R θ is a 2D rotation matrix. In other words, a rotation box p with parameters (x0, y0, w, h, θ) can be expressed as p~N(μ, Σ), where μ and Σ are:

[0078]

[0079] Next, this paper takes ProbIoU as an example. It takes into account the characteristics of 2D Gaussian distribution, meets all distance metric standards, can represent the true distance between different distributions, and is differentiable everywhere. ProbIoU first calculates the Hellinger Distance between two 2D Gaussian distributions (p and q):

[0080]

[0081] Where HD(p,q)∈[0,1], HD(p,q)=0 if and only if the two distributions are the same. Then we can get the specific calculation formula of ProbIoU:

[0082] ProbIoU = 1-HD(p,q) (9)

[0083] However, this type of IoU method based on 2D Gaussian distribution does not perform well when facing square-like objects. If there are two squares with the same size and center point, then no matter how much the angle difference between them is, their 2D Gaussian distributions are always the same. Mathematically analyzing the 2D Gaussian distribution p~N(μ,Σ), let (the difference between the aspect ratio of the anchor box and 1), the covariance matrix ∑ can be transformed into:

[0084]

[0085] From formula (10), it can be found that when t approaches 0 (when the aspect ratio of the anchor box approaches 1), the calculation of the covariance matrix ∑ has almost no involvement of θ. At this time, the mathematical distance between the 2D Gaussian distributions can only be calculated by the mean μ (center point position) and the height h of the anchor box.

[0086] Therefore, the present invention introduces an additional constraint to make IoU have better performance when facing square-like objects. When a rectangle is rotated, its minimum horizontal bounding rectangle will also change. And this change is continuous and bounded, and there will be no boundary discontinuity caused by angle periodicity. The change of the bounding rectangle caused by the rotation of the anchor box is as follows: Figure 5 shown.

[0087] The present invention is based on the ProbIoU method and uses the minimum horizontal rectangle of the anchor box to describe the rotation of the anchor box. Then the diagonal distance of the circumscribed rectangle is used as a constraint to calculate the IoU. This diagonal distance d can be obtained by the following formula (11):

[0088]

[0089] In this invention, the d of the real box and the predicted box are respectively referred to as d t and d p , and then divide their difference by d t Get the relative distance difference. Then multiply this relative distance by a dynamic coefficient k to use it as the diagonal distance constraint. At this time, the DPIoU formula can be obtained:

[0090]

[0091] Next, the dynamic coefficient k is discussed. The main target of the diagonal distance constraint should be a square-like shape, because other rectangles can completely distinguish the rotation angle through 2D Gaussian distribution. Based on this, the present invention designs a shape-based dynamic weighting function to adaptively determine the coefficient k. The function is as follows:

[0092]

[0093] This is a function similar to a Gaussian distribution, where σ is the standard deviation (determines the width of the peak) and α determines the peak value of the function. It reaches its maximum value when the aspect ratio is 1 and gradually decreases on both sides of the peak. In the ablation experiment of the present invention, the best performance is obtained when α and σ are 0.08 and 0.25 respectively. This function forces the diagonal constraint to focus on anchor boxes with low aspect ratios.

[0094] The present invention uses 2D Gaussian distribution to represent the real box and the predicted box as t(x) and p(x) respectively, and combines equations (11), (12), and (13) to obtain the final DPIoU formula:

[0095]

[0096] In contrast, the present invention applies ProbIoU and DPIoU to a group of anchor boxes with the same size and center point, and the calculated IoU is as follows: Figure 6 As shown in the figure, ProbIoU considers that two anchor boxes with different angles completely overlap (IoU=1), while DPIoU effectively avoids this situation.

[0097] When DPIoU faces an anchor box with a high aspect ratio, the dynamic weighting function reduces the constraints on the diagonal distance, thereby achieving the excellent performance brought by the IoU method. When it faces an anchor box with a low aspect ratio, the constraints on the diagonal distance increase, thereby alleviating the problem that the IoU is always 1 due to the same 2D Gaussian distribution.

[0098] Then the effect of the above embodiment is evaluated:

[0099] 1. Experimental environment and evaluation indicators

[0100] In an embodiment of the present invention, the training of the target detection network is run on a server whose CPU is Intel Xeon Gold 6132 and GPU is NVIDIA Tesla V100; all other experiments are run on a PC whose CPU is Intel Core i5-8750H, GPU is NVIDIA GeForce 1060, and memory is 16G. This example uses the SWIM public dataset as a benchmark dataset for training and testing. The SWIM dataset is an optical remote sensing dataset built for ship wake detection. It contains images of coastal areas around Asia, Europe, Africa, North America, and Oceania. The annotated targets include ship wakes, from small yachts to large container ships, and the backgrounds include the high seas, ports, straits, and canals. The spatial resolution of the image is 2.5m to 0.5m, and the size is 768×768 pixels. SWIM contains 11,600 images and 15,356 wake instances. The present invention divides it according to the ratio of training set: validation set: test set of 7:2:1.

[0101] The present invention uses mAP (Mean Average Precision) as a comprehensive performance evaluation index. It is calculated by the Precision and Recall indicators. The present invention represents true positive, false positive, and false negative as TP, FP, and FN respectively. Then the formulas of Precision and Recall are as follows:

[0102]

[0103] At this time, the calculation formula of average precision (AP) can be expressed as:

[0104]

[0105] Where P refers to Precision and R refers to Recall. The mAP when the IoU threshold is 0.5 is recorded as mAP50. The mAP when the IoU threshold range is 0.5 to 0.95 (with a step size of 0.05) is recorded as mAP50:95. The definition of mAP is as follows:

[0106]

[0107] Where N refers to the number of categories, and APi represents the AP value of the i-th category. In addition, the present invention uses the FPS (Frames Per Second) indicator as a measure of the real-time performance of the model. It represents the number of frames processed per second by the model. The higher the FPS, the better the real-time performance of the model.

[0108] 2. Performance indicator analysis

[0109] In order to verify the effectiveness of the algorithm proposed in the present invention, the method of the present invention, R-RetinaNet, R-Faster R-CNN, ROI Transformer, S2ANet, YOLOv5n-CSL, YOLOv7-KLD and YOLOv8-obb ​​are trained and tested on the SWIM dataset respectively. Among them, YOLOv5n-CSL introduces CSL (Circular Smooth Label) into the horizontal box detector YOLOv5n, thereby obtaining the rotation detection capability. YOLOv7-KLD introduces KLD (Kullback-LeiblerDivergence) into the horizontal box detector YOLOv7, thereby obtaining the rotation detection capability. YOLOv8n-obb is a rotation detection version of YOLOv8 obtained by introducing ProbIoU. The experimental results of these models are shown in Table 1.

[0110] Table 1 Experimental results of different network methods on the SWIM dataset (rotating box)

[0111]

[0112]

[0113] As can be seen from the table, the model of the present invention achieves the best scores in both mAP50 and mAP50:95 indicators. This shows that it has the best comprehensive detection capability and can accurately and stably detect trails. In terms of real-time performance, it achieves a score of 135FPS, which is only slightly lower than YOLOv8n, but is sufficient to meet the real-time requirements of remote sensing image detection.

[0114] 3. Analysis of actual detection results

[0115] In order to verify the improved effects of the present invention on angle prediction and edge features, the detection results of the model proposed in the present invention, YOLOv8-obb, YOLOv7-KLD and YOLOv5n-CSL in different scenarios are displayed and compared.

[0116] Figure 8 This is a display of the results of different methods in a simple scenario, which facilitates the present invention to compare the angle prediction accuracy of different methods. Figure 8 (a) and Figure 8It can be found in (b) that when the target anchor box is close to a square, the method of the present invention can accurately predict the angle. However, YOLOv8-obb ​​and YOLOv7-KLD produce large angle prediction deviations, and YOLOv5-CSL also produces small angle prediction deviations. This is because both YOLOv8-obb ​​and YOLOv7-KLD use IoU loss based on 2D Gaussian distribution, which makes them unable to accurately judge the quality of angle prediction when facing square-like objects. The method of the present invention introduces diagonal constraints to avoid this problem.

[0117] YOLOv5-CSL classifies angles and replaces regression predictions with category predictions. So it has no obvious flaws when facing square-like objects. But its overall performance is not as good as the method using 2D Gaussian distribution, which is also Figure 8 The reason why only YOLOv5-CSL has a large angle prediction deviation in (c). Figure 8 The target in (c) has a high aspect ratio. In this case, the 2D Gaussian distribution method can give full play to its performance and obtain accurate angle prediction.

[0118] The present invention Fig. 9 The detection results in more complex scenarios are shown in Figure 2 to compare the comprehensive performance of different methods. As can be seen from the figure, the method of the present invention can accurately identify ship wakes in various scenarios, while YOLOv8n-obb is prone to missed detection when facing overlapping wakes. For YOLOv7-KLD and YOLOv5n-CSL, they both mistakenly identify surface clutter and island edges as wakes, and produce more missed detections than YOLOv8n-obb. Fig. 9 In (d), the method of the present invention obtains the result closest to the annotation box. After detecting multiple small tails, other methods will combine them together again as a large tail. This may be caused by the network not fully learning the discrete linear texture features.

[0119] Therefore, the experimental results show that the method of the present invention can achieve competitive performance in various complex scenarios and significantly improve the angle prediction accuracy when facing square-like targets.

[0120] 4. Effectiveness Analysis (Ablation Experiment)

[0121] The present invention introduces the method proposed in the present invention into YOLOv8n-obb in sequence to verify the effectiveness of each module. In addition to using mAP as the evaluation index of comprehensive performance, the present invention also evaluates the improvement of the model in angle prediction accuracy by using the mean angle prediction error (MeanAnglePredictionError). The mean angle prediction error is the average value of the error between the predicted angle and the actual angle among all correctly predicted targets, which reflects the overall accuracy of angle prediction. The results of the ablation experiment are shown in Table 3.

[0122] Table 2 Ablation test results of the three methods proposed in this invention introduced into YOLOv8n-obb

[0123]

[0124]

[0125] It can be found from Table 2 that the modules and loss functions proposed in the present invention can effectively improve the accuracy of the model, and when they are combined together, even better performance can be achieved. In addition, DPIoU can significantly improve the accuracy of the model for angle prediction. The method of the present invention reduces the average angle prediction error from 15.35° to 7.16°, which can help the present invention predict the heading of the ship more accurately.

[0126] 5. Generalization Analysis

[0127] In order to verify the generalization of the proposed method, the proposed method, YOLOv8-obb, YOLOv7-KLD and YOLOv5-CSL were experimented on the OpenSARWake

[38] public dataset. OpenSARWake is a ship wake detection dataset based on SAR images. The dataset contains SAR images in the L, C and X bands with a spatial resolution of 1.25m to 12.5m. It has 3973 images and 4096 instances, and the image size is 1024×1024 pixels.

[0128] Table 3. Experimental results of different network methods on the OpenSARWake dataset (rotating box).

[0129]

[0130] As can be seen from Table 3, compared with other methods, the method of the present invention achieves the best comprehensive performance on the OpenSARWake dataset. Its mAP50 reaches 66.2%, and its mAP50:95 reaches 29.4%. In addition, the present invention shows the detection results of the above method in different scenarios, such as Fig.10 shown.

[0131] exist Fig.10 There are unclear long tails in (a) and (b), and there are a few places with blurred texture in the middle of the long tail. Among all the methods, the Predicted Box of the method of the present invention is closest to the Ground Truth Box. When there are unclear textures in a long tail, YOLOv8n-obb is easy to identify the long tail as two short tails, or only detect part of it. YOLOv7-KLD and YOLOv5-CSL will have repeated detections, and they will think that the long tail is composed of multiple tails superimposed on each other.

[0132] exist Fig.10 There are many non-ship interference targets in (c), (d), and (e) (such as cages, reefs, islands, etc.). At this time, the method of the present invention can still accurately identify the wake of the ship without missing or misdetecting. Other methods have missed or misdetected. This shows that the algorithm of the present invention has excellent robustness. It learns the characteristics of the wake more clearly and is not interfered by other targets.

[0133] It can be seen from the above experimental results that the method of the present invention has excellent generalization. It not only has advantages in visible light remote sensing images, but also has competitive performance in SAR images.

[0134] Those skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present invention is limited to these examples; under the concept of the present invention, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A remote sensing ship wake rotation detection method guided by discrete edge features, characterized in that: The method comprises the following steps: Collect optical remote sensing or SAR images of ship wakes and pre-process the images; The ship wake rotation detection is performed on the preprocessed image through the improved YOLOv8n network to obtain the ship wake information; In the improved YOLOv8n network, a feature extraction module DEF focusing on discrete edges is used to replace the P1 layer and the P2 layer in the backbone network of the basic YOLOv8n. The feature extraction module DEF extracts the spatial features and the edge features of the preprocessed image respectively through the edge branch and the convolution branch, and combines the spatial features and the edge features of the image to obtain the image features. By setting the context attention fusion module EGCA at the end of the feature pyramid, a fusion of high-dimensional features and low-dimensional features is completed before the final detection; DPIoU is introduced into the loss function of the YOLOv8n network for IoU calculation.

2. The method for detecting remote sensing ship wake rotation guided by discrete edge features according to claim 1, characterized in that: The pre-processing comprises: The image is processed into an 8-bit RGB image, and grayscale equalization and Gaussian smoothing are performed on the image.

3. The method for detecting remote sensing ship wake rotation guided by discrete edge features according to claim 1, characterized in that: In the feature extraction module DEF, the process of extracting edge features through edge branches includes: Use the Scharr operator as the edge detection operator, convolve the two 3×3 matrices contained in the Scharr operator with the image matrix respectively to obtain the horizontal and vertical brightness difference approximation, that is, the horizontal and vertical edge detection results G x and G y , G x and G y The edge feature G is obtained by adding the corresponding features.

4. The method for detecting remote sensing ship wake rotation guided by discrete edge features according to claim 3 is characterized in that: The formula for convolution with the image matrix is: Where A represents the input image matrix.

5. The method for detecting remote sensing ship wake rotation guided by discrete edge features according to claim 1, characterized in that: The context attention fusion module EGCA includes an attention branch and an edge branch, and the attention branch is used to generate the initial feature importance weights for each channel. Where C, H, and W refer to the number of channels, height, and width, respectively. The edge branch is used to extract edge features G' in parallel. The edge features G' are used as guides to calculate the initial weights of each corresponding channel. Make adjustments, and calculate the adjusted results through the activation function Sigmoid to obtain the usable weight W; The low-dimensional feature map and the high-dimensional feature map are adaptively weighted and reorganized using the weight W, and then aggregated and adjusted through a 1×1 convolution to obtain the fusion result F of the high-dimensional feature and the low-dimensional feature.

6. The method for detecting remote sensing ship wake rotation guided by discrete edge features according to claim 5, characterized in that: The edge feature G' is used as a guide to calculate the initial weight of each corresponding channel Adjustments include: W pre Concatenate with G' and use the channel shuffle operation to make W pre and G' are grouped in pairs along the channel so that each group has a W pre and G' of its corresponding channel; Use Group Conv to convolve each group separately, so that W pre Adjust according to the guidance of G'.

7. The method for detecting remote sensing ship wake rotation guided by discrete edge features according to claim 5, characterized in that: The edge branch in the contextual attention fusion module EGCA uses the Sobel operator to obtain the edge feature G' as follows: G'=G' x +G' y Among them, G' x and G' y They represent the results of horizontal and vertical edge detection respectively, and A represents the input image matrix.

8. The method for detecting remote sensing ship wake rotation guided by discrete edge features according to claim 1, characterized in that: The formula for DPIoU is: Among them, t(x) is the 2D Gaussian distribution representation of the real box, p(x) is the 2D Gaussian distribution representation of the predicted box, and d t Represents the minimum diagonal distance of the rectangle surrounding the real box, d p Indicates the diagonal distance of the minimum rectangle enclosing the prediction box, k t is an adaptive weighting factor.

9. A remote sensing ship wake rotation detection device guided by discrete edge features, characterized in that: A remote sensing ship wake rotation detection method guided by discrete edge features as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Rotating frame small target detection method based on Gaussian angle loss

    CN121616815A