An example ship identification method, terminal device, and storage medium

By constructing a ship recognition model based on ResNet50 and attention-aware pyramid network, the problems of viewpoint change, scale change and low visibility in instance-level ship recognition are solved, and high-precision and high-speed ship instance recognition is achieved.

CN116486180BActive Publication Date: 2025-12-12JIMEI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310601057.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2025-12-12
Estimated Expiration
2043-05-25

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve automatic identification of instance-level ships, facing challenges such as changes in perspective and scale, low visibility, and insufficient datasets, resulting in high identification difficulty and insufficient accuracy and speed.

Method used

An instance-level ship recognition method is adopted. By constructing a model based on a ResNet50 backbone network, an attention-aware pyramid network, a detail enhancement module, and a detection head, and combining CBAM and RetinaNet's FPN, the Focal Loss loss function is used to improve the model's recognition accuracy and speed under changes in viewpoint, scale, and low visibility.

Benefits of technology

It effectively improves the accuracy and speed of instance-level ship recognition, enabling accurate identification of ship instances in complex scenarios and enhancing the model's generalization performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116486180B_ABST
    Figure CN116486180B_ABST
Patent Text Reader

Abstract

The application relates to an instance-level ship identification method, a terminal device and a storage medium. In the method, an APN containing an attention module and an RFPN is designed to guide the network to focus on effective features and fuse multi-scale features, thereby relieving the problem of model performance decline caused by changes in the visual angle and scale. In addition, the skip product layer in the attention perception pyramid network is used to enhance the cross of features in the shallow layer and the deep layer, thereby improving the generalization of the model to low-visibility scenes such as weak light and fog. In order to further enhance the detail information to increase the feature difference between the instance levels, a detail information enhancement module is developed to refine the fused multi-scale features. The application can effectively cope with the influence of changes in the visual angle, scale and low-visibility environment on the detection model performance in the instance-level ship identification, and improves the detection speed while improving the detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ship classification, and in particular to an instance-level ship identification method, terminal equipment, and storage medium. Background Technology

[0002] With the development of the marine economy and shipping industry, the volume of ships at sea is increasing year by year, and maritime safety accidents and territorial disputes are also on the rise. As important carriers of human activities at sea, ships have significant application value in both civilian and military fields, including maritime traffic management and marine monitoring. Information from such automated systems can not only reduce human observation errors but also provide a basis for maritime missions requiring information on specific vessels, such as maritime rescue, track analysis, and target reconnaissance. Therefore, ship identification at the ship level can assist personnel in maritime traffic management, marine monitoring, and other maritime missions.

[0003] Traditional ship classifiers primarily rely on manually crafted features, which are insufficient to represent the detailed, discriminative features of ships and cannot perform instance-level recognition. Computer vision, on the other hand, uses a system composed of computers and information acquisition devices such as cameras to simulate biological vision. In recent years, computer vision has attracted significant attention in fields such as industrial production, healthcare, and marine monitoring. Object detection, as one of the fundamental tasks of computer vision, has seen a surge in methods based on Convolutional Neural Networks (CNNs) driven by deep learning. These methods are mainly divided into two levels of detectors, such as Mask R-CNN, the R-CNN series, and R-FCN. [7] Two-level detectors, such as SSD, YOLO series, and RetinaNet, offer higher detection accuracy, while single-level detectors offer faster detection speed. Advances in detectors have significantly improved image classification accuracy. Currently, there are many deep learning-based ship detection methods. Unfortunately, these studies mainly focus on coarse-grained or fine-grained classification, simply distinguishing between ship targets and non-ship targets, or classifying ships into categories such as warships, passenger ships, fishing boats, and oil tankers. Although fine-grained image classification can classify more granular subcategories compared to coarse-grained image classification, it still cannot identify ship instances. Research on instance-level ship recognition is currently lacking.

[0004] Instance-level category is a further refinement of fine-grained classification, one fine-grained category contains multiple instances, and each instance-level category contains a unique instance. Therefore, compared with standard fine-grained recognition, instance-level recognition is more difficult. In addition, each instance changes differently in different scenarios, which makes instance-level classification more complex. As an important technology of marine monitoring, instance-level ship recognition mainly faces the following challenges:

[0005] (1) Appearance feature changes caused by view angle changes. Due to the rigid characteristics of ships, different ship instances with the same category, color and other features have similar appearances, and the same ship instance has large appearance difference under different view angles. The difference between instances is small, and the difference within instances is large, which increases the difficulty of instance-level ship recognition.

[0006] (2) Large scale change. With the change of observation distance, the same ship instance has different scales in the image, and different ship scales are also different. When detecting large-scale targets, small-scale targets are easy to be missed, and the scale change of the target affects the performance of the detection model.

[0007] (3) Low image resolution. Under low-visibility conditions such as weak light and fog, the target image resolution is low, it is difficult to extract effective features, and the target recognition difficulty is increased.

[0008] (4) Lack of data set. CNN-based target detection model usually needs to be trained on a large-scale data set. Although ImageNet, PASCAL VOC and COCO open data sets contain ship categories, they only contain one class "boat". The data sets Seaships and Mcships are designed specifically for ship detection, where Seaships contains 6 types of civilian ships, and Mcships contains 6 types of military ships and 7 types of civilian ships, none of which are divided into instance-level categories, which does not meet the needs of instance-level ship recognition. SUMMARY

[0009] In order to solve the above problems, the present application provides an instance-level ship recognition method, a terminal device and a storage medium.

[0010] The specific scheme is as follows:

[0011] An instance-level ship recognition method, comprising the following steps:

[0012] S1: Collecting multiple images of each ship instance from different view angles to form a training set, and labeling according to instance-level categories;

[0013] S2: Constructing an instance-level ship recognition model, and training the model through the training set;

[0014] The model sequentially comprises a backbone network, an attention perception pyramid network, a detail information enhancement module and a detection head from input to output; the backbone network adopts a residual network to extract features of the input image; the attention perception pyramid network comprises two parts of a CBAM with a skip product layer and a FPN of the RetinaNet; each layer of features output by the backbone network is input to a CBAM with a skip product layer, and outputs of all CBAMs are jointly input to the FPN, and the FPN adopts a top-down fusion manner to obtain fused features; different layers of fused features output by the FPN are input to a detail information enhancement module respectively for feature enhancement; in the detail information enhancement module, the input fused features are subjected to multiple convolution operations first, then the multiple convolution operation results are pixel-wise multiplied with the input features, and finally the pixel-wise multiplication results are pixel-wise summed with the input features to obtain final features; the detection head is used for classifying the input final features.

[0015] S3: performing instance-level recognition on each ship through the trained model.

[0016] Further, the ResNet50 network is adopted in the backbone network.

[0017] Further, the CBAM in the attention perception pyramid network comprises a channel attention module and a spatial attention module, in the channel attention module, global average pooling and global maximum pooling along the spatial dimension of the input feature map are replaced by adaptive average pooling and adaptive maximum pooling, and a 1x1 convolution layer is used to replace the fully connected layer of the multi-layer perceptron.

[0018] Further, the CBAM in the attention perception pyramid network is increased with a skip product layer in the following manner: the input feature map is element-wise multiplied with the output feature.

[0019] Further, in the FPN of the attention perception pyramid network, the channel dimension is unified through a 1x1 convolution when fusing multiple layers of features, then the upper layer feature map is up-sampled and added to the lower layer feature map in the fusion process; in the bottom-up process, the uppermost layer feature is subjected to convolution operation to obtain a deeper layer of features, and the deeper layer of features is subjected to activation operation and convolution operation to obtain the deepest layer of features.

[0020] Further, the detection head comprises a classification subnet and a regression subnet of the RetinaNet.

[0021] Further, the loss function of the model adopts the Focal Loss.

[0022] An example level ship identification terminal device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the embodiments of the application when executing the computer program.

[0023] A computer readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to the embodiments of the application when executed by a processor.

[0024] The technical scheme can effectively improve the recognition accuracy of the target under the changes of the visual angle, the scale and the low-visibility scene, and improve the detection speed. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 Fig. 1 shows a flowchart of an embodiment of the application.

[0026] Figure 2 Fig. 2 shows a network structure diagram of a model in the embodiment.

[0027] Figure 3 Fig. 3 shows a structure diagram of CBAM with a skip product layer in the embodiment.

[0028] Figure 4 Fig. 4 shows a structure diagram of an attention-aware pyramid network in the embodiment.

[0029] Figure 5 Fig. 5 shows a structure diagram of a detail feature enhancement module in the embodiment. DETAILED DESCRIPTION

[0030] To further illustrate the embodiments, the application provides accompanying drawings. These drawings are part of the disclosure of the application, mainly used to illustrate the embodiments, and can be used to explain the operating principle of the embodiments in conjunction with the related description of the specification. Those skilled in the art should understand other possible implementations and advantages of the application by referring to these contents.

[0031] The application will be further described in conjunction with the accompanying drawings and specific embodiments.

[0032] Embodiment one:

[0033] The embodiment of the application provides an example level ship identification method, as shown in the following. Figure 1 The method comprises the following steps:

[0034] S1: Collecting a plurality of images of different visual angles of each ship instance to form a training set, and labeling according to the instance level category.

[0035] Since there is currently a lack of public data sets for instance-level ship recognition, this embodiment downloads multi-class multi-instance ship images from a public website, labels them using the labelImg labeling tool, and creates an instance-level ship data set. Specifically, the instance-level ship data set created in this embodiment contains 2352 images, divided into 93 instance-level classes. The specific instance-level classes are passenger ship i (i = 1, 2,..., 21), denoted as p#i; cargo ship j (j = 1, 2,..., 22), denoted as c#j; tanker k (k = 1, 2,..., 23), denoted as c#k; warship m (m = 1, 2,..., 27), denoted as w#m, a total of 93 classes.

[0036] To enhance the diversity of the data set and adapt to changes in perspective, scale, and complex real-world scenarios such as fog, the original images are scaled down in this embodiment to improve the robustness of the model when the target scale changes. To simulate sea fog conditions, this embodiment uses an image fogging algorithm based on the standard optical model to fog the original images.

[0037] S2: Construct an instance-level ship recognition model and train the model using the training set.

[0038] The network structure of the instance-level ship recognition model uses an end-to-end single-stage network based on RetinaNet, which is mainly composed of four modules: a backbone network, an attention perception pyramid network, a detailed information enhancement module (DFENet), and a detection head. ResNet50 feature extraction is used in the backbone network. The attention perception pyramid network (APN) includes two parts: CBAM with skip product layer (SPLCBAM) and RFPN. SPLCBAM is used to guide the network to pay more attention to effective information and improve the network's generalization performance in low-visibility environments, and RFPN is used to fuse multi-layer features and mine deeper semantic information. DFENet is used to refine feature information and further improve the network's recognition accuracy. The detection head is composed of the classification subnet and the regression subnet of RetinaNet.

[0039] The attention mechanism in deep learning simulates the human visual system, which guides the network model to pay more attention to effective information by selecting the target area of interest and weakening the attention to other areas. The attention mechanism has been widely used in the field of target detection. According to the dimension of the attention mechanism, it can be divided into channel attention and spatial attention. Channel attention is mainly used to guide the network to pay attention to the content, while spatial attention plays an important role in deciding the location of attention. CBAM (channel and spatial attention mechanism) can effectively improve the detection accuracy of ships, so this embodiment introduces CBAM in RetinaNet, so that the network can learn the content and location that needs to be paid attention to in the channel dimension and spatial dimension respectively, and enhance the cross of features through the skip product layer to improve the generalization performance of the model in low visibility environment.

[0040] With the change of observation distance, the target has different scales in the image, and the target size is also different. The scale change affects the target detection performance. The root of the scale problem lies in that in the process of deepening the convolutional neural network, the ability to express abstract features gradually increases, but the size of the feature map will decrease. The disadvantage of small feature maps is that they tend to lose information about small objects; similarly, large feature maps lack high-level semantic information. Deep learning technology can learn multiple feature layers directly from the original image. The large size feature map of the shallow layer contains more structure and geometric information of the target, which is beneficial to the regression of the target; the small size feature map of the high layer contains more semantic information, which is beneficial to the classification of the object. The extraction of effective features is the key problem to realize more accurate classification and positioning. Therefore, the general idea to solve the multi-scale problem is to construct a multi-scale feature expression. The feature pyramid network (FPN) is the first network to construct a pyramid architecture by fusing features of different levels to enhance the feature representation of CNN. FPN takes an image of any scale as input and outputs feature maps of different scales in multiple layers in the form of full convolution, which improves the detection accuracy of multi-scale targets to a certain extent. However, the top-down pyramid structure of FPN only propagates high-level semantic features from the deep layer of the network to the shallow layer, but does not propagate low-level semantic features from the shallow layer of the network to the deep layer, resulting in that while improving the detection accuracy of small-scale targets, the detection accuracy of large-scale targets does not improve significantly. PANet (Path aggregation network) adds a bottom-up feature fusion path based on FPN, which retains more bottom layer feature information. In recent years, research on multi-scale ship detection mainly obtains multi-scale features through FPN and PANet and their variants, which effectively improves the detection accuracy of the model for multi-scale ships. However, it cannot fully exploit potential information, and a large number of connected feature layers will increase the training burden of the model and feature redundancy, affecting the detection effect of the model. RetinaNet discards the fusion of bottom layer features based on FPN, reduces the computational complexity, and replaces the bottom-up fusion with convolution to mine deeper semantic features, which alleviates the feature redundancy. Therefore, in the embodiment, the multi-scale feature is obtained by using the feature fusion method in RetinaNet, and the detection performance of the network model for scale change ships is improved.

[0041] The overall structure diagram of the model network is as Figure 2The input image is first extracted by a backbone network to obtain feature layers Ci (i = 3, 4, 5) at layer3, layer4 and layer5, and then guided by an attention perception pyramid network to pay more attention to the effective information and enhanced feature cross of Ci and obtain multi-scale features Fj (j = 3, 4, 5, 6, 7), and then the details of Fj are refined by a detail information enhancement module to enhance the ship features and improve the recognition accuracy of the model for instance-level ships under changes in viewing angle, scale and low-visibility scenes. Finally, the head detector predicts the instance class score and regression bounding box, and after non-maximum suppression (NMS) processing, the final prediction result is obtained. Figure 2 where w, h represent the width and height of the feature map respectively, k is the number of classes, a is the number of generated anchor boxes, and ka is the number of channels of the feature map.

[0042] In computer vision-based target detection, the loss function is used to measure the difference between the model prediction value and the true value, which is an important indicator for the model to update the weights through back propagation. The cross entropy loss (Cross Entropy Loss) shown in equation (1) is usually used in the class prediction of target detection models such as R-CNN series and YOLO series. However, when the positive and negative sample ratio is unbalanced, the loss of negative samples will dominate the model to be biased towards the background, seriously affecting the model detection performance. The balanced cross entropy function (Balanced Cross Entropy) improves the weight of a small number of samples in the loss function by adding a weight factor to the loss function, effectively solving the loss function tilt problem caused by unbalanced samples. However, when there are many samples with high confidence, the entire training process will be dominated by easy-to-distinguish samples, while difficult-to-distinguish samples that need to be focused on are ignored. In order to make the model pay more attention to difficult-to-distinguish samples to solve the imbalance between foreground and background classes in traditional target detectors, FocalLoss adds a modulation factor (1-p t ) γ and a weight factor a t to the Cross Entropy Loss, where y is an adjustable focus parameter and y > 0, a t is used to suppress the imbalance between positive and negative samples, and its expression is shown in equation (3). This embodiment studies instance-level ship recognition, and the DISR background is self-made and variable, and the features of instance-level ships of the same fine-grained class are small and difficult to distinguish. Therefore, Focal Loss is used as the loss function.

[0043] CE(p t ) = -log(p t ), (1)

[0044]

[0045] FL(p t )=-α t (1-p t ) γ log(p t ) (3)

[0046] In formula (2), y represents a true label value of a sample.

[0047] In order to enhance the salient features of different instances of ships, improve the recognition ability and generalization performance of the model, an attention perception pyramid network (APN) is designed in the embodiment, which is composed of SPLCBAM and FPN in RetinaNet, and the specific structure of the attention perception pyramid network is as shown in Figure 3 Firstly, CBAM is introduced after the backbone network to guide the network model to focus on the most important area of the image to improve the performance. CBAM contains two parts of channel attention module (CAM) and spatial attention module (SAM). In CAM, in order to facilitate the calculation of kernel size and step, the global average pooling and global maximum pooling which are parallel in the spatial dimension of the input feature map Ci (i=3, 4, 5) are replaced by adaptive average pooling (AAP) and adaptive maximum pooling (AMP) to obtain two different types of spatial context information. In order to not limit the size of the input image, a 1x1 convolution layer is used instead of the fully connected layer of the multi-layer perceptron. After the outputs of AAP and AMP are subjected to convolution operation and relu activation respectively, two groups of feature maps are obtained, and then the element sum operation is performed on the two groups of feature maps, and finally the weight is generated in the channel dimension through the sigmoid activation function to measure the importance of each channel, and is applied to Ci to enhance the feature response, and then the region features F i that need to be paid attention to in the channel dimension are obtained. i In SAM, the weighted weight in the spatial dimension of F i is obtained. In the channel dimension, AvgPooling and MaxPooling are performed on F i in parallel, and the pooled feature maps are connected in the channel dimension. After 2-D convolution and sigmoid activation function, the weight in the spatial dimension is obtained. Finally, F i is multiplied by F To increase the nonlinear ability of the model and improve the recognition accuracy of the model in the fog environment, a skip product layer is added to the CBAM to enhance the feature cross ability of the network by performing an element-wise product operation. The structure of the SPLCBAM is shown in FIG. 3. The whole process can be represented as: Figure 4

[0048]

[0049]

[0050]

[0051]

[0052]

[0053] wherein σ1 and σ2 represent the activation functions sigmoid and ReLU, respectively. f represents a 2-D convolution function, and 1x1 and 3x3 represent the convolution kernel size. cat(·) represents a connection operation in the channel dimension, and PC i represents the final output feature of the PLCBAM.

[0054] The high-level feature map has rich semantic information but poor position information, while the low-level feature map has high resolution but lacks semantic information. Therefore, it is necessary to fuse features of different layers and balance between semantic information and position information. The FPN adopts a top-down fusion manner for the output feature of the PLCBAM, effectively solving the problem of information loss in the down-sampling feature fusion process. Through a bottom-up down-sampling manner, deeper semantic features are obtained, which greatly utilizes multi-layer information and reduces information redundancy, and is conducive to improving the model performance. Compared with the traditional FPN, the FPN of the RetinaNet discards the C2 layer when fusing multi-layer features, reducing the calculation memory. First, the channel dimension is unified through a 1x1 convolution, and the upper feature map PC 4 and the lower feature map PC 5 are up-sampled in the fusion process and added to the lower feature map. In the bottom-up process, in order to adapt to a larger range of anchor boxes, the PC 5 is subjected to a convolution operation to obtain a deeper feature layer F6. Then, the F6 is subjected to an activation operation and a convolution operation to obtain F7. Thus, five scale feature layers are obtained.

[0055] ​​The same type of ship has a similar appearance, and the appearance of the same ship instance under different viewing angles is quite different. Moreover, in a low-visibility environment, the image resolution is low, and the target features are not obvious. The changes in viewing angle and low-resolution images increase the difficulty of instance-level ship recognition. In order to enhance the salient features of the ship instance and further improve the recognition accuracy, in the embodiment, DFEM is used to refine the multi-layer features Fj (j = 3, 4, 5, 6, 7), and the structural diagram is as shown in Figure 5 First, Fj is subjected to three convolution operations to mine deeper semantic information SFj, and then pixel-level multiplication is performed with Fj to obtain cross features CFj. Finally, the shallow features are retained through the jump connection to further enhance the model performance. The process can be represented as:

[0056]

[0057]

[0058]

[0059] wherein, represents pixel-level multiplication, ⊕ represents pixel-level summation, and DFj is the final output feature of the DFEM.

[0060] S3: Instance-level recognition of each ship is performed through the trained model.

[0061] The embodiment of the present application proposes a network model for instance-level ship recognition, designs an APN containing an attention module and an RFPN, and uses the APN to guide the network to focus on effective features and fuse multi-scale features, thereby relieving the problem of performance decline of the model caused by changes in viewing angle and scale. In addition, the jump product layer in the APN is used to enhance the cross of shallow and deep features, thereby improving the generalization of the model to low-visibility scenes such as weak light and fog. In order to further enhance the detail information to increase the feature difference between the instance levels, the DFEM is developed to refine the fused multi-scale features. Experiments prove that the method of the embodiment can effectively cope with the influence of changes in viewing angle, scale and low-visibility environment on the performance of the detection model in instance-level ship recognition, and improves the detection speed while improving the detection accuracy.

[0062] Embodiment two

[0063] The present application also provides an instance-level ship recognition terminal device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above method embodiments of the first embodiment of the present application when executing the computer program.

[0064] Further, as an executable solution, the instance-level ship identification terminal device can be a desktop computer, a notebook, a palm computer, a cloud server, and the like. The instance-level ship identification terminal device can include, but is not limited to, a processor, a memory. Those skilled in the art can understand that the above-mentioned component structure of the instance-level ship identification terminal device is only an example of the instance-level ship identification terminal device, and does not constitute a limitation on the instance-level ship identification terminal device, and can include more or fewer components than the above, or combine certain components, or different components, for example, the instance-level ship identification terminal device can also include an input / output device, a network access device, a bus, and the like, and the embodiments of the present application do not limit this.

[0065] Further, as an executable solution, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor is a control center of the instance-level ship identification terminal device, and connects various parts of the entire instance-level ship identification terminal device through various interfaces and lines.

[0066] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the instance-level ship identification terminal device by running or executing the computer program and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0067] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method of the above-mentioned embodiments of the application.

[0068] The modules / units of the example-level ship identification terminal device integration, if realized in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, the application can also complete all or part of the processes of the above-mentioned embodiments by a computer program to instruct related hardware, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM) and software distribution medium, etc.

[0069] Although the application is specifically shown and described in connection with the preferred embodiments, those skilled in the art should understand that various changes in form and details can be made to the application without departing from the spirit and scope of the application defined by the appended claims.

Claims

1. An instance-level ship identification method, characterized by, The method comprises the following steps: S1: collecting a plurality of different view image groups of each ship instance to form a training set, and labeling according to an instance level category; S2: constructing an instance level ship identification model, and training the model through the training set; The model comprises, from input to output, a backbone network, an attention perception pyramid network, a detail information enhancement module, and a detection head; the backbone network adopts a residual network to extract features of the input image; the attention perception pyramid network comprises a CBAM with a skip product layer and a FPN of a RetinaNet; each layer of features output by the backbone network is input to a CBAM with a skip product layer, and the outputs of all CBAMs are jointly input to the FPN, and the FPN adopts a top-down fusion manner to obtain fused features; the fused features of different layers output by the FPN are input to a detail information enhancement module for feature enhancement; The detail information enhancement module first performs a plurality of convolution operations on the input fused features, then performs pixel-level multiplication on the convolution operation results and the input features, and finally performs pixel-level summation on the pixel-level multiplication results and the input features to obtain final features; the detection head is used for classifying the input final features; S3: identifying each ship through the trained model.

2. The example-level ship identification method of claim 1, wherein: The backbone network adopts a ResNet50 network.

3. The example level ship identification method of claim 1, wherein: The CBAM in the attention perception pyramid network comprises a channel attention module and a spatial attention module, in the channel attention module, global average pooling and global maximum pooling along the spatial dimension of the input feature map are replaced by adaptive average pooling and adaptive maximum pooling, and a 1*1 convolution layer is used to replace the full connection layer of the multi-layer perceptron.

4. The example level ship identification method of claim 1, wherein: In the attention perception pyramid network, a skip product layer is added to the CBAM in the following manner: the input feature map is element-wise multiplied with the output feature.

5. The instance-level ship identification method of claim 1, wherein: In the FPN of the attention perception pyramid network, the channel dimension is unified through a 1*1 convolution when fusing multiple layers of features, and then the upper layer feature map is up-sampled and added to the lower layer feature map in the fusion process; in the bottom-up process, the uppermost layer feature is subjected to convolution operation to obtain a deeper layer of features, and then the deeper layer of features is subjected to activation operation and convolution operation to obtain the deepest layer of features.

6. The example-level ship identification method of claim 1, wherein: The detection head comprises a classification subnet and a regression subnet of the RetinaNet.

7. The instance-level ship identification method of claim 1, wherein: The loss function of the model adopts a FocalLoss.

8. An example level ship identification terminal device, characterized by: The computer program is executed by the processor to implement the steps of the method according to any one of claims 1-7.

9. A computer readable storage medium, the computer readable storage medium storing a computer program, characterized in that: The computer program is executed by the processor to implement the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Multi-class SAR image ship detection method based on rotation detection frame

    CN115359263A

  • Personal protection article detection network based on attention mechanism and multi-scale fusion

    CN116051957A