Marine small target ship detection method and device for wide remote sensing image

By using heavy-parameterized large convolution kernel modules and imbalanced learning loss functions in wide-width remote sensing images, combined with the YOLOv7 model, the problems of low resolution and sample imbalance in small target ship detection at sea are solved, and a better solution is achieved. Efficient detection performance.

CN118608980AActive Publication Date: 2024-09-06HAINAN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410649035.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-06
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

It is difficult to achieve efficient detection of small target ships at sea in existing wide-width remote sensing satellite images, mainly due to insufficient target feature information due to low spatial resolution and low spectral resolution, and a serious imbalance between target class and background class samples, resulting in model failure. Poor performance when identifying small targets.

Method used

The heavily parameterized large convolution kernel module C2Rep and the loss function PFL based on imbalanced learning are used, combined with the YOLOv7 model, to enhance the receptive field and gradient flow information through the large convolution kernel module, introduce depth separable convolution to reduce complexity, and Adjust the loss weight through prior knowledge, dynamically focus on difficult samples, and build a small target detection model LKPF-YOLO.

Benefits of technology

It improves the model's feature extraction capabilities for small targets and low-contrast targets, enhances detection performance, can better identify small target ships at sea in wide-width remote sensing images, and improves detection accuracy and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608980A
    Figure CN118608980A
Patent Text Reader

Abstract

The embodiment of the invention discloses a marine small target ship detection method and device aiming at a wide remote sensing image. The method comprises the following steps: acquiring continuously input original gray level images shot by a wide remote sensing satellite; preprocessing and cutting the original grayscale image to obtain an 8-bit RGB (Red, Green and Blue) image; constructing a heavy parameterized large convolution kernel module C2Rep; constructing a loss function PFL based on unbalanced learning; a small target detection model LKPF-YOLO is constructed; and inputting the 8-bit RGB image into a small target detection model LKPF-YOLO to obtain an offshore small target ship detection result.
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 and deep learning technology, and in particular to a method and device for detecting small target ships at sea based on wide-area remote sensing images. Background Art

[0002] At present, ship target detection based on satellite remote sensing images is in a stage of rapid development. With the continuous advancement of satellite technology and image processing algorithms, researchers have achieved remarkable results in the field of ocean monitoring. In terms of remote sensing technology, aerospace imaging technologies such as satellite remote sensing and drone reconnaissance can obtain high-definition ground object target information with high spatial resolution, providing a rich image data source for the detection and identification of targets in the field of maritime security. In terms of algorithms, the application of machine learning technologies such as deep learning and convolutional neural networks provides new possibilities for the automatic identification of ship targets. The researchers trained the model with a large number of annotated data sets, enabling it to learn and identify ship targets from complex satellite images, improving the accuracy and efficiency of detection.

[0003] However, most of the current research on ship target detection is based on remote sensing satellites with high spatial resolution. These remote sensing satellites usually focus on ports. Since they do not need to monitor a large area, they are often designed with high spatial resolution or high spectral resolution. Therefore, the ships in the images acquired by these satellites are of moderate scale and have rich texture details. In addition to these remote sensing satellites with high spatial resolution, there are also some wide-band remote sensing satellites designed to monitor large sea areas. Due to the vast ocean, the primary purpose of these satellites is no longer to obtain clearer images, but to cover a larger area. Therefore, they were designed to reduce other performance in order to increase the shooting range, which will result in a small number of source pixels of ships in the image and lack of texture information. In addition, the ships in the ocean are sparsely distributed, which makes the target class and background class samples in the image seriously unbalanced, and the complex marine environment also makes ships more easily obscured by clouds.

[0004] Therefore, current related research is difficult to achieve good performance when facing small target ships at sea under wide-width remote sensing satellites. The model needs to be more adaptable and be able to effectively extract and identify the features of small target ships under wide-width remote sensing images with low spatial resolution and low spectral resolution to achieve efficient detection results. Although ship detection research based on machine learning methods and deep learning technology has emerged one after another, the main difficulties faced by the task of small target ship detection at sea have not yet been solved. The challenges currently faced by small target ship detection at sea based on wide-width remote sensing images are summarized as follows:

[0005] (1) There is a lack of wide-band remote sensing ship datasets for monitoring large sea areas. Most existing ship datasets are based on high-resolution images of ports. In order to cover as large an area as possible, wide-band remote sensing satellites reduce spatial and spectral resolutions, resulting in low resolution and small spectral range of remote sensing images.

[0006] (2) Marine ship targets in wide-width remote sensing images are small and have insufficient texture information, usually with less than 200 pixels. After multiple feature extractions by the model, the network will lose the feature information of small targets.

[0007] (3) The distribution of ships at sea is relatively sparse, and in the entire image dataset, there is often a serious imbalance in the class frequency between target and background samples, which can easily lead to insufficient target class learning. Summary of the invention

[0008] Based on this, it is necessary to propose a method and device for detecting small target ships at sea based on wide-area remote sensing images to address the above problems.

[0009] An embodiment of the present invention provides a method for detecting small target ships at sea based on wide-area remote sensing images, the method comprising:

[0010] Obtaining the original grayscale images taken by wide-area remote sensing satellites for continuous input;

[0011] Preprocessing and cropping the original grayscale image to obtain an 8-bit RGB image;

[0012] Construct a re-parameterized large convolution kernel module C2Rep;

[0013] Construct a loss function PFL based on imbalanced learning;

[0014] Build the small target detection model LKPF-YOLO;

[0015] The 8-bit RGB image is input into the small target detection model LKPF-YOLO to obtain the small target ship detection result at sea.

[0016] In the above scheme, the large convolution kernel module C2Rep is expressed by the following formula:

[0017] y1=Split[CBS(X,kernel=1)]

[0018] y n =RepConv[y n-1 ,kernel=(27,5)]

[0019]

[0020] Among them, X is the input of the C2Rep module, Z is the output of the C2Rep module, n is the number of times RepConv is stacked in the C2Rep module, and the Split operation is to slice and divide the number of input channels according to the required number; CBS consists of 3 consecutive modules: convolution Conv, batch normalization BN, and activation function Silu. A CBS operation is a complete feature extraction process; RepConv is a heavily parameterized convolution consisting of a small core and a large core; Concat is to splice multiple inputs in terms of the number of channels.

[0021] In the above scheme, the construction of the loss function PFL based on imbalanced learning specifically includes: adding PFL as a factor to ObjectnessLoss and ClassificationLoss, adjusting the weight according to the real box area and confidence of the current sample; LocalizationLoss as a geometric loss keeps its original form, and obtains an improved loss function PFL based on the prior knowledge factor combined with QFL, and the total loss function Loss is obtained after the loss function PFL is integrated into YOLOv7; the total loss function Loss is:

[0022] In the above scheme, the distribution of the real box area in the statistical data set is calculated, and the central value obtained when the data is most concentrated, that is, when the mean absolute deviation is minimum, is calculated, and finally the loss weight is determined according to the relationship between the real box area value of the current sample and the central value.

[0023] In the above scheme, the calculation of the central value obtained when the data is most concentrated, that is, when the mean absolute deviation is the smallest, specifically includes: according to c=argminMAD(u), OK, MAD refers to the mean absolute deviation, u refers to the mean, and n is the number of ground-truth boxes.

[0024] In the above scheme, the improved loss function PFL is obtained based on the prior knowledge factor combined with QFL.

[0025] In the above scheme, the prior knowledge factor is based on Sure.

[0026] In the above scheme, the construction of the small target detection model LKPF-YOLO specifically includes: introducing the large convolution kernel module C2Rep into YOLOv7, using the C3 module to replace the ELAN-H structure in the head part, using PFL as the loss function, and dynamically adjusting the loss weight based on prior knowledge and the confidence of the current sample.

[0027] The embodiment of the present invention further provides a device for detecting small target ships at sea based on wide-area remote sensing images, the device comprising:

[0028] An image processing unit is used to obtain the original grayscale images taken by the wide-format remote sensing satellite and input continuously; and is also used to preprocess and crop the original grayscale images to obtain 8-bit RGB images;

[0029] The model processing unit is used to construct a re-parameterized large convolution kernel module C2Rep; it is also used to construct a loss function PFL based on imbalanced learning; it is also used to construct a small target detection model LKPF-YOLO; it is also used to input the 8-bit RGB image into the small target detection model LKPF-YOLO to obtain a small target ship detection result at sea.

[0030] The embodiments of the present invention have the following beneficial effects:

[0031] The present invention successfully constructs an improved detection model LKPF-YOLO based on YOLOv7. By constructing a new re-parameterized large kernel module C2Rep, the model has a larger effective receptive field and richer gradient flow information, thereby improving the feature extraction capability of small objects and low-contrast targets; secondly, the deep separable convolution and C3 modules are introduced to reduce the high complexity brought by the large convolution kernel; finally, the present invention proposes a loss function PrioriFocalLoss based on unbalanced learning and prior knowledge. It dynamically adjusts the loss weight according to the confidence of the current sample, and assists in determining the value of the weight through the distribution of the real box size in the data set, so that the model pays more attention to the training of few samples and difficult samples. The present invention uses the above strategy to further improve the detection capability of the model, so that it can better meet the needs of practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in 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 described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] in:

[0034] Figure 1 It is the overall block diagram of the system of the present invention;

[0035] Figure 2 It is the structural diagram of each module of the present invention;

[0036] Figure 3 This is the LKPF-YOLO network structure diagram proposed by the present invention;

[0037] Figure 4It is the mAP curve transformation diagram of each model;

[0038] Figure 5 It is the detection effect diagram of the present invention;

[0039] Figure 6 The following is a comparison chart of the detection effects of each model. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.

[0041] The embodiment of the present invention provides a method for detecting small target ships at sea based on wide-area remote sensing images. Figure 1 As shown, the method includes:

[0042] Step 101: obtaining continuously inputted original grayscale images taken by wide-width remote sensing satellites;

[0043] Step 102: preprocessing and cropping the original grayscale image to obtain an 8-bit RGB image;

[0044] Specifically, the models in the present invention only receive standard 8-bit RGB images. The color depth of original remote sensing images is usually higher than 8 bits, and most wide-format remote sensing satellites take single-channel grayscale images.

[0045] The present invention converts the original image with high color depth into 8 bits through grayscale linear transformation, and then copies a single channel to three channels, so as to ensure that an 8-bit RGB image is input into the model.

[0046] Step 103: construct a re-parameterized large convolution kernel module C2Rep;

[0047] Specifically, YOLOv7 uses the CBS module and the ELAN module multiple times for downsampling and feature extraction, and finally fuses feature maps of different scales; however, small target samples have fewer source pixels, and after the image is significantly downsampled by the model, its features are difficult to be learned by deep feature maps.

[0048] RepLKBlock is a structure that incorporates large convolution kernels. It verifies that using large kernel re-parameterized convolution in the model can produce a larger effective receptive field and higher shape deviation. Figure 2As shown in Figure 1, it mainly consists of a small core and a large core. In order to solve the problem of large convolution kernels bringing more parameters, RepLKNet introduces depthwise separable convolution, so that each convolution kernel only calculates one corresponding feature map. This design allows the network to effectively avoid a sharp increase in the number of parameters while introducing large convolution kernels, thereby effectively maintaining the timeliness of the network and improving network performance. The structure of RepLKBlock is shown in Figure 1. Figure 2 As shown in Figure 2, it consists of batch normalization, two ordinary convolutions, one RepConv, and a residual connection. By connecting the large kernel and the small kernel in a reparameterized manner, it is possible to increase the size of the convolution kernel while reducing memory consumption and computational cost.

[0049] C2f module( Figure 2 d) was proposed in YOLOv8, which refers to C3 ( Figure 2 c) and the idea of ​​ELAN, so that the model can obtain richer gradient flow information while ensuring lightweight. This module stacks multiple Bottleneck layers and finally connects them through concat to obtain more gradient flows. However, in the traditional C2f module, due to the limited receptive field of ordinary convolution, the accuracy of small object detection may be low.

[0050] Therefore, the present invention proposes an improved method, namely, introducing RepLKBlock in the C2f module to effectively capture the features of small targets through a re-parameterized large convolution kernel, thereby improving the detection capability of small targets.

[0051] The C2Rep module proposed in the present invention is as follows Figure 2 As shown in Figure 5, RepLKBlock is introduced in each feature layer of the C2f structure to achieve more refined feature extraction and fusion; there are multiple stacked RepLKBlocks in the C2Rep module, which serve as the main branch gradient module, that is, the residual module, and obtain a larger effective receptive field through re-parameterized large convolution, thereby fully extracting small target features. The introduction of RepLKBlock makes the model pay more attention to the shape features in the image, and will not cause a significant drop in model performance due to the lack of texture information in the image, so that it can maintain excellent performance when facing small targets. Among them, the number of RepLKBlock stacks is controlled by the parameter n, that is, the module size can be adjusted according to the scale of the model or the location of introduction. This design allows the model to obtain more contextual information and high-resolution information at the same time by performing operations such as convolution, upsampling and channel splicing on feature maps of different levels, thereby improving the model's detection ability for small objects and low-contrast targets.

[0052] In general, the C2rep proposed in the present invention increases the kernel size while reducing memory consumption and computational cost by reparameterization. Compared with the traditional CNN convolution, it has a larger receptive field and more gradient flow information. This allows the network to extract more small target features when facing small targets and low-contrast targets, and pays more attention to shape features rather than texture features, helping the network to better complete the localization and classification of small targets.

[0053] In view of the small scale and missing texture of small objects, the present invention adds a re-parameterized large kernel convolution to the original C2f module and proposes a C2Rep structure. The C2Rep structure can be expressed by the following formula:

[0054] y1=Split[CBS(X,kernel=1)](1)

[0055] y n =RepConv[y n-1 ,kernel=(27,5)](2)

[0056]

[0057] Among them, X is the input of the C2Rep module, Z is the output of the C2Rep module, and n is the number of stacking of RepConv in the C2Rep module. The Split operation is to slice and divide the number of input channels according to the required number; CBS consists of 3 consecutive modules: Conv (convolution), BN (batch normalization), Silu (activation function), and a CBS operation is a complete feature extraction process; RepConv is a re-parameterized convolution consisting of a small core and a large core ( Figure 2 a), where the size of the large kernel is 27 and the size of the small kernel is 5, which can extract small target features more effectively than the original small kernel convolution; Concat is to concatenate multiple inputs in terms of the number of channels. Formula 1 is the result of the Split operation after the first convolution of the input X, Formula 2 is the output of each stacked RepLKBlock in the module, and Formula 3 is the output Z obtained by fusing the previous gradient flows.

[0058] Step 104: Construct a loss function PFL based on imbalanced learning.

[0059] Specifically, in the ship detection task, neural networks usually define positive anchors and negative anchors based on IoU scores, but this often amplifies the imbalance problem of marine ship samples, resulting in a decrease in detection performance. This is because ships are often sparsely distributed in marine remote sensing images, and there is a serious frequency imbalance between ship target classes and ocean background classes. As a result, only a very small number of prior frames are used to detect and fit positive samples, while most prior frames can only match negative samples. The introduction of the QualityFocal Loss (QFL) loss function improves this problem. It uses confidence to judge the difficulty of the current sample and adjusts the loss weight accordingly.

[0060] QualityFocalLoss is a loss function improved from FocalLoss, which enables the model to obtain better positioning and classification performance and helps the model to better complete unbalanced learning tasks. Formula 4 is the binary cross entropy loss function:

[0061]

[0062] Where y is the label value of the sample. When y=1, it is a positive sample, otherwise it is a negative sample. And p is the probability that the model predicts that a sample is a positive sample. t It is the prediction score after the prediction probability is distinguished according to the positive and negative samples. If the present invention sets the two parameters α and 1-α to balance the weights of positive samples and negative samples, then Formula 4 can be transformed into the following form:

[0063]

[0064] In order to dynamically identify the difficult and easy samples and adjust the weight accordingly, a coefficient (1-p t ) γ . Where γ is a hyperparameter, and its value is usually between 0.5 and 1. Then

[0065] Formula 5 becomes the following form, which is FocalLoss:

[0066]

[0067] QFL retains the advantages of FL for class imbalance problems while enabling it to handle continuous label values. It expands FL by: (1) converting the cross entropy part log(p t ) expands to the full form -((1-y)log(1-σ)+ylog(σ))(2) scaling each sample by a factor of (1-p) γ Generalization is the absolute value between the predicted value and the actual value (y-σ) β (β>0).

[0068] This gives us the specific formula for QFL:

[0069] QFL(σ)=-|y-σ| β [(1-y)log(1-σ)+ylog(σ)](7)

[0070] Where y is a quality label ranging from 0 to 1, and σ is the predicted score of the target detected by the model. Note that the global minimum solution of QFL is σ = y, and β is a constant with a value between (0, 1), so that the cross entropy part becomes the complete cross entropy.

[0071] In the scenario of small target detection, difficult samples are usually samples with smaller true box areas. The smaller the true box, the less source pixels and texture information the sample has, and the greater the detection difficulty. For the distribution of the true box area of ​​the data set, it is mainly concentrated near a central value. In the detection task of small targets, the present invention can generally consider that the true box area is smaller than the central value is a small target (difficult sample), the one near the central value is a normal-sized target (ordinary sample), and the one far above the central value is a large target (simple sample). Afterwards, the present invention introduces this prior knowledge to pre-set a loss weight value for the sample, so that the model pays more attention to small target samples, and then adjusts the loss weight in real time according to the confidence of the current sample during the training process of the model.

[0072] Based on the above ideas, the present invention proposes a priori knowledge factor that focuses on the area distribution of the real box of the sample, and uses it to assist the model in determining the loss weight. This factor solves the problem of insufficient adaptability and robustness caused by the fact that the basis for QFL to judge the difficulty of the sample is too single. This allows the network to more effectively deal with scenes with sparse distribution of marine ships in remote sensing images.

[0073] Specifically, the factor first counts the distribution of the true box area in the data set, then calculates the center value where the data is most concentrated, that is, when the mean absolute deviation is the smallest, and finally determines a preliminary loss weight based on the relationship between the true box area value of the current sample and the center value. The prior knowledge factor is shown in Formula 8.

[0074]

[0075] Where k is a constant used to adjust the demarcation point of adding or subtracting weights. In the present invention, 0.8 is usually used for better results. x is the real box area of ​​the current sample. c is the center value of the most concentrated real box area distribution of all samples, which is generally obtained when the mean absolute deviation is the smallest. The present invention uses all calculated real box area values ​​x n Put a set X = {x1, x2, x3, ... x n}, the present invention needs to obtain the value with the most concentrated distribution of elements in set X, and the mean absolute deviation is used here to measure the metric of "concentration". That is, when c is used as the mean, the mean absolute deviation of set X will be minimized, as shown in Formula 9.

[0076]

[0077] Among them, MAD refers to the mean absolute deviation, u refers to the mean, and n is the number of true boxes.

[0078] Furthermore, the present invention combines the proposed prior knowledge factor (Formula 8) with QFL (Formula 7) to obtain an improved loss function PFL, as shown in Formula 10.

[0079]

[0080] PFL can effectively deal with the scenes where ships are sparsely distributed and the target and background classes are unbalanced in remote sensing images. Compared with QFL, which only has confidence as a basis for judgment, PFL has a higher anti-interference ability by introducing a priori knowledge factors. Thus, better performance can be achieved in the early stage of model training to reduce the impact of unreliable confidence caused by sparse distribution of ships in the early stage of training.

[0081] The loss function used by YOLOv7 is ObjectnessLoss (Loss obj )、Classification Loss(Loss cls ) and LocalizationLoss(Loss box ) is composed of the weighted sum of the three losses, as shown in Equation 11.

[0082] Loss = a*Loss obj +b*Loss cls +c*Loss box =a*BCE obj +b*BCE cls +c*CIoU box (11)

[0083] Among them, a, b, and c are the weighted proportions of the three losses, BCE is the BinaryCrossEntropy loss measurement, CIoU is the intersection-over-union evaluation index in image classification, and ObjectnessLoss and ClassificationLoss both use the BinaryCrossEntropy loss measurement. The formula is as follows:

[0084]

[0085] Where N is the number of categories, y is the true label, and p is the predicted value.

[0086] LocalizationLoss is measured by CIoU. CIOU also adds the overlap area, center point distance and aspect ratio between the predicted box A and the real box B into the calculation, as shown in Equation 13.

[0087]

[0088] Among them, ρ is the distance between the center points of the predicted box A and the real box B, c is the diagonal length of the minimum enclosing rectangle of the predicted box A and the real box B, v is the similarity of the aspect ratio of the predicted box A and the real box B, and α is the influencing factor of v.

[0089] Finally, the present invention adds PFL as a factor to ObjectnessLoss and ClassificationLoss, and adjusts their weights according to the real box area and confidence of the current sample. LocalizationLoss, as a geometric loss, maintains its original form. Combining equations 10 to 13, we get the total loss function Loss that integrates PFL into YOLOv7:

[0090]

[0091] Step 105: Build a new small target detection model LKPF-YOLO.

[0092] Specifically, the present invention proposes the LKPF-YOLO model, which addresses the characteristics of small targets lacking source pixels and texture details by improving the model's sensitivity to shape and allowing the model to obtain richer gradient flow information. The network structure diagram of the model is shown in Figure 3 As shown in the figure. First, the C2Rep module proposed in this study is introduced into YOLOv7. This module has a larger effective receptive field than the ELAN structure and pays more attention to the shape features in the image, avoiding the situation where the model performance is greatly reduced due to the lack of texture information in the image. Secondly, the framework uses a more lightweight C3 module ( Figure 2 c) By replacing the ELAN-H structure in the head part, the C3 module has a lighter structure than ELAN-H and C2f, which can effectively reduce the complexity of the model. Finally, the model uses the PrioriFocalLoss (PFL) proposed in this paper as the loss function, dynamically adjusting the loss weight based on prior knowledge and the confidence of the current sample, so that the model pays more attention to difficult samples.

[0093] In order to meet the needs of small target detection in wide-format remote sensing images, this paper proposes a new model LKPF-YOLO based on large kernel modules and unbalanced learning. This model solves the detection difficulty problem caused by the small scale and sparse distribution of ships in wide-format satellite remote sensing images, and achieves high-accuracy detection in complex scenes such as dense ships, sparse ships, small target ships, and ships blocked by clouds.

[0094] Experimental results show that compared with the original model, the mAP50 and mAP50:95 of the proposed model reach 93.6% and 50.7%, respectively, which are 5.5% and 12.9% higher, and the number of parameters and the amount of calculation are reduced by 7% and 18.7% respectively. The proposed model can meet the needs of small target detection in wide-area remote sensing images and has good adaptability.

[0095] Experimental data

[0096] 1. Experimental environment and evaluation indicators

[0097] 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 embodiment first trains the improved model on the self-built "Hainan One Star" remote sensing data set, which consists of 4027 images of 1024 × 1024 pixels and a total of 7602 ship instances. Then the improved model is trained on the SSDD and DIOR public data sets to verify the generalization and adaptability of the embodiments of the present invention. SSDD is a ship data set based on SAR images, which is a single-channel low-resolution image. DIOR is a color optical remote sensing image data set containing 20 categories, with richer scenes and more categories.

[0098] The evaluation indicators of the present invention use Precision, Recall, mAP50 and mAP50:95.

[0099] For binary classification problems, positive samples are called Positive, negative samples are called Negative, and the correct prediction of the classifier is recorded as True, and the wrong prediction is recorded as False. They are combined to form the four basic elements of the confusion matrix, which are TP (True Positive), FN (False Negative), TN (True Negative), and FP (False Positive). Precision refers to the ratio of the target detection model judging that the example is a positive class and the correct prediction accounts for all positive classes, as shown in Formula 15. Recall refers to the ratio of the model predicting that it is a positive class and the correct prediction accounts for all positive predictions, as shown in Formula 16.

[0100]

[0101]

[0102] When the confidence level is different, the present invention will also obtain different Precision and Recall. If a curve graph is drawn with confidence level as the independent variable and Precision and Recall as the dependent variables, the present invention will obtain a Precision-Recall curve graph (PR curve). AP actually refers to the area under the PR curve, and mAP is the average of the AP values ​​of all classes. Among them, mAP50 specifically refers to the calculation of the AP of all pictures of each class when IoU is set to 0.5, and then all categories are averaged. And mAP50:95 represents the average mAP when IoU is in steps of 0.05 from 0.5 to 0.95. The formulas of mAP50 and mAP50:95 are shown in Equations 17 and 18, respectively.

[0103]

[0104]

[0105] 2. Performance indicator analysis

[0106] In order to verify the effectiveness of the model proposed in this paper, the improved network is compared with the original YOLOv7 network, YOLOv7x, YOLOv7&QFL network, SSD, FasterRCNN, YOLOv5n, and YOLOv8n. The performance evaluation indicators used are Precision, Recall, mAP50, and mAP50:95 introduced above. The mAP change curves of each network are shown in the figure below. Figure 4 The performance comparison is shown in Table 1.

[0107] Table 1 Performance comparison of each network

[0108]

[0109] from Figure 4 It can be seen that with the increase of the number of epochs, the mAP of the method of the present invention gradually tends to be stable, and the overall curve is higher than other network models. In addition, the present invention notes that although the curve of the YOLOv7&QFL network is higher than that of YOLOv7 at the end, its convergence speed at the beginning of training is significantly worse than that of other networks, and the fluctuation range is larger. The high index obtained by YOLOv7&QFL at the end of training is because QFL can make the model focus on difficult samples, thereby achieving a better performance. However, at the beginning of training, the model has not fully learned the characteristics of the sample, and the confidence at this time is not very reliable, resulting in poor results of YOLOv7&QFL in the early stage of training. The LKPF-YOLO network that incorporates prior knowledge solves this problem better. It achieved a high convergence speed at the beginning of training, and the curve did not show excessive fluctuations.

[0110] It can be seen from the data in Table 1 that the model of the present invention has better performance than several mainstream models. The performance indicators of the improved network (Precision, Recall, mAP50, mAP50:95) reached 90.5%, 89.2%, 93.6%, and 50.7%, which were improved by about 3.4%, 5.6%, 5.5%, and 12.9% respectively compared with the original network. At the same time, the Recall index of the model of the present invention has a greater advantage than the Precision index compared with other models, which shows that the large convolution kernel used in this study makes it less likely for the model to miss small targets or targets with lack of texture.

[0111] 3. Analysis of actual detection results

[0112] This paper demonstrates the recognition effect of this model in complex scenes, such as Figure 5 As shown in the figure, it can be seen that the improved network has a good detection effect whether facing scenes of dense ships, tiny ships, multi-scale ships or ships obscured by clouds.

[0113] In addition, the present invention also demonstrates and compares the detection effects of the present method and other methods on the same image. Figure 6As shown. Among them, the position marked with a red circle indicates that there are missed ships, and the position marked with a blue circle indicates that other objects are mistakenly identified as ships. It can be seen that the network proposed by the present invention can accurately identify ships in the image regardless of whether it is facing a dense ship scene or a multi-scale scene, while other models have some missed detections or false detections. YOLOv7 and YOLOv7&QFL both missed small ships and ships close to each other in dense ship scenes; in port scenes, they both misidentified long strip docks as ships; in foggy scenes, YOLOv7&QFL also misidentified block clouds as ships. The present invention notes that although the long strip docks and block clouds are both slender in shape, they are still quite different from ships. The ship is rugby-shaped, the dock is rectangular, and the cloud is irregular in shape. This shows that the misjudgment of YOLOv7 and YOLOv7&QFL is not entirely caused by the lack of texture information in the image, but also because the model is insensitive to the shape of small targets. For YOLOv5n and YOLOv8n, they missed many small ships. This is because the feature information of small objects is lost after the image is downsampled multiple times through the network.

[0114] 4. Effectiveness Analysis (Ablation Experiment)

[0115] In order to verify the effectiveness of the C2Rep module and PFL proposed in the present invention, an ablation experiment was conducted by comparing the effects of combining different modules. The experimental results are shown in Table 2. The ELAN module is the feature extraction module used by the original YOLOv7.

[0116] Table 2 Ablation experiment comparison table

[0117]

[0118] As can be seen from the table, the introduction of the C2Rep module and PFL have effectively improved the performance of the network. After the network only incorporates the C2Rep module, Recall and mAP are effectively improved, and only Precision decreases. This shows that the large convolution kernel in the module plays an effective role, that is, it can fully extract the features of small targets, thereby reducing the omission of small targets. After the network continues to introduce PFL, all indicators are improved, and finally all key indicators are ahead of the original network.

[0119] 5. Generalization Analysis

[0120] The present invention also conducted generalization experiments on the SSDD and DIOR datasets with other mainstream models. Although SSDD is a ship dataset based on SAR images, it is very similar to grayscale wide-band remote sensing images in morphology, and they are both single-channel low-resolution images. DIOR is a color optical remote sensing image dataset containing 20 categories, with richer scenes and more categories, and most of the target samples are very small. The experimental results are shown in the following table:

[0121] Table 3 Experiments of various models on the SSDD dataset

[0122]

[0123] Table 4 Experiments of various models on the DIOR dataset

[0124]

[0125] Experimental results show that the mAP50 index of the proposed model is ahead of other networks and achieves the best comprehensive detection performance. Among all the indicators, it is only slightly lower than YOLOv8n in the Recall index on the SSDD dataset and the mAP50:95 index on the DIOR dataset. The results prove that the advantages of the proposed model are not limited to grayscale remote sensing images of a single sample category, but can also achieve competitive performance on images of other multi-sample categories and multi-color channels.

[0126] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0127] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for detecting small marine target ships based on wide-area remote sensing images, characterized in that: The method comprises: Obtaining the original grayscale images taken by wide-area remote sensing satellites for continuous input; Preprocessing and cropping the original grayscale image to obtain an 8-bit RGB image; Construct a re-parameterized large convolution kernel module C2Rep; Construct a loss function PFL based on imbalanced learning; Build the small target detection model LKPF-YOLO; The 8-bit RGB image is input into the small target detection model LKPF-YOLO to obtain the small target ship detection result at sea.

2. The method for detecting small marine targets based on wide-area remote sensing images according to claim 1, characterized in that: The large convolution kernel module C2Rep is expressed by the following formula: y1=Split[CBS(X,kernel=1)] and n =RepConv[and n-1 ,kernel=(27,5)] Among them, X is the input of the C2Rep module, Z is the output of the C2Rep module, n is the number of times RepConv is stacked in the C2Rep module, and the Split operation is to slice and divide the number of input channels according to the required number; CBS consists of 3 consecutive modules: convolution Conv, batch normalization BN, and activation function Silu. A CBS operation is a complete feature extraction process; RepConv is a heavily parameterized convolution consisting of a small core and a large core; Concat is to splice multiple inputs in terms of the number of channels.

3. The method for detecting small marine target ships based on wide-width remote sensing images according to claim 1 or 2, characterized in that: The construction of the loss function PFL based on imbalanced learning specifically includes: adding PFL as a factor to ObjectnessLoss and Classification Loss, adjusting the weight according to the real box area and confidence of the current sample; Localization Loss as a geometric loss keeps its original form, and obtains an improved loss function PFL according to the prior knowledge factor combined with QFL, and obtains the total loss function Loss after integrating the loss function PFL into YOLOv7; the total loss function Loss is:

4. The method for detecting small marine target ships based on wide-width remote sensing images according to claim 3 is characterized in that: The statistical data is collected to determine the distribution of the true box area, and the central value is calculated when the data is most concentrated, that is, when the mean absolute deviation is the smallest. Finally, the loss weight is determined based on the relationship between the true box area value of the current sample and the central value.

5. The method for detecting small marine targets based on wide-area remote sensing images according to claim 4, characterized in that: The calculation of the central value obtained when the data is most concentrated, that is, when the mean absolute deviation is the smallest, specifically includes: according to c=argminMAD(u), OK, MAD refers to the mean absolute deviation, u refers to the mean, and n is the number of ground-truth boxes.

6. The method for detecting small marine target ships based on wide-width remote sensing images according to claim 5, characterized in that: According to the prior knowledge factor combined with QFL, the improved loss function PFL is obtained.

7. The method for detecting small marine target ships based on wide-width remote sensing images according to claim 6, characterized in that: The prior knowledge factor is based on Sure.

8. The method for detecting small marine target ships based on wide-width remote sensing images according to claim 7 is characterized in that: The construction of the small target detection model LKPF-YOLO specifically includes: introducing the large convolution kernel module C2Rep into YOLOv7, using the C3 module to replace the ELAN-H structure in the head part, using PFL as the loss function, and dynamically adjusting the loss weight based on prior knowledge and the confidence of the current sample.

9. A small target ship detection device for wide-width remote sensing images at sea, characterized in that: The device comprises: An image processing unit, used for acquiring the original grayscale images taken by the wide-format remote sensing satellite that are continuously input; It is also used to pre-process and crop the original grayscale image to obtain an 8-bit RGB image; Model processing unit, used to construct the re-parameterized large convolution kernel module C2Rep; also used to construct the loss function PFL based on imbalanced learning; also used to construct the small target detection model LKPF-YOLO; It is also used to input the 8-bit RGB image into the small target detection model LKPF-YOLO to obtain the small target ship detection result at sea.

Citation Information

Patent Citations

  • Remote sensing image ship small target detection method based on target perception

    CN113780152A

  • Marine ship detection method based on synthetic aperture radar data

    CN116665148A

  • Infrared ship target detection method based on improved yolov7

    CN117152691A

  • Remote sensing image detection method based on improved YOLOv7 algorithm

    CN117830866A