A method, system, device, and readable storage medium for ship target detection.
By expanding the receptive field and embedding relative position coding in synthetic aperture radar information, the problem of decreased detection accuracy caused by discontinuity and incompleteness in ship detection is solved, achieving higher detection accuracy and lower false alarm rate.
Patent Information
- Application Number
- CN202411118301.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-15
AI Technical Summary
Synthetic aperture radar imaging technology suffers from decreased detection accuracy, false alarms, and serious positioning misalignment problems in ship inspection due to the discontinuity and incompleteness of ship instances.
By acquiring synthetic aperture radar information, performing feature extraction, expanding the receptive field using the receptive field module and supplementing ship structure information, and embedding relative position coding using the position coding module, more accurate target detection can be achieved.
It improved the accuracy of ship target detection, reduced the risk of false alarms and positioning deviations, and enhanced detection precision.
Smart Images

Figure CN118628933B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of radar signal processing technology, and in particular to a ship target detection method, system, device and readable storage medium. Background Art
[0002] With the development of deep learning, synthetic aperture radar imaging technology has obvious advantages in ship detection. However, due to the unique instance morphology of ships and complex background interference, the ship instances in the information collected by synthetic aperture radar are usually displayed as internal holes or regional fractures, resulting in discontinuity and incomplete expression of ship instances, which complicates the anchor frame regression in the detection network. The detection frame may drift to the holes and fracture areas, making it easy to produce false alarms and positioning deviations, thereby reducing the detection accuracy. Summary of the invention
[0003] The object of the present invention is to provide a ship target detection method, system, device and readable storage medium to improve the above-mentioned problems.
[0004] In order to achieve the above objectives, the present application provides the following technical solutions:
[0005] On the one hand, an embodiment of the present application provides a ship target detection method, the method comprising:
[0006] Acquiring synthetic aperture radar information, wherein the synthetic aperture radar information includes information of a ship to be detected;
[0007] Performing feature extraction on the synthetic aperture radar information to obtain a first feature vector, a second feature vector, and a third feature vector, wherein the first feature vector, the second feature vector, and the third feature vector have different sizes, and the first feature vector has the smallest size;
[0008] Sending the first feature vector to a receptive field module to obtain a fourth feature vector, wherein the receptive field module is used to expand the receptive field;
[0009] Sending the fourth feature vector to a position encoding module to obtain a fifth feature vector;
[0010] The ship information to be detected in the synthetic aperture radar information is detected according to the fifth eigenvector, the second eigenvector and the third eigenvector.
[0011] In a second aspect, an embodiment of the present application provides a ship target detection system, the system comprising:
[0012] An acquisition module, used for acquiring synthetic aperture radar information, wherein the synthetic aperture radar information includes information of a ship to be detected;
[0013] A first processing module is used to extract features from the synthetic aperture radar information to obtain a first feature vector, a second feature vector and a third feature vector, wherein the first feature vector, the second feature vector and the third feature vector have different sizes, and the first feature vector has the smallest size;
[0014] A second processing module, used for sending the first feature vector to a receptive field module to obtain a fourth feature vector, wherein the receptive field module is used for expanding the receptive field;
[0015] A third processing module, used for sending the fourth feature vector to a position encoding module to obtain a fifth feature vector;
[0016] The fourth processing module is used to detect the ship information to be detected in the synthetic aperture radar information according to the fifth eigenvector, the second eigenvector and the third eigenvector.
[0017] In a third aspect, an embodiment of the present application provides a ship target detection device, the device comprising a memory and a processor. The memory is used to store a computer program; the processor is used to implement the steps of the above ship target detection method when executing the computer program.
[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned ship target detection method are implemented.
[0019] The beneficial effects of the present invention are:
[0020] The present invention obtains synthetic aperture radar information and performs feature extraction on it, and then sends the first feature vector obtained by feature extraction to the receptive field module to supplement the missing ship structure information, expand the larger receptive field and global perspective, ignore the instance discontinuity and incompleteness caused by ship holes and regional fractures due to the synthetic aperture radar imaging mechanism, and then send the fourth feature vector to the position encoding module to make it more accurately express and capture the position relationship in the self-attention mechanism. Finally, based on feature vectors of different scales, the ship is detected to improve the accuracy of target detection.
[0021] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 Schematic diagram of the process of ship target detection method described in an embodiment of the present invention.
[0024] Figure 2 Schematic diagram of the structure of the ship target detection system described in an embodiment of the present invention.
[0025] Figure 3 It is a schematic diagram of the structure of the ship target detection device described in an embodiment of the present invention.
[0026] Labels in the figure: 901, acquisition module; 902, first processing module; 903, second processing module; 904, third processing module; 905, fourth processing module; 800, ship target detection equipment; 801, processor; 802, memory; 803, multimedia component; 804, I / O interface; 805, communication component. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0028] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0029] Embodiment 1:
[0030] This embodiment provides a method for detecting a ship target. It can be understood that a scene can be set up in this embodiment, for example: a scene for detecting a ship in a synthetic aperture radar.
[0031] See also Figure 1 , the figure shows that the method includes step S1, step S2, step S3, step S4 and step S5, which specifically include:
[0032] Step S1, obtaining synthetic aperture radar information, wherein the synthetic aperture radar information includes information of a ship to be detected;
[0033] In this step, synthetic aperture radar is a high-resolution active microwave imaging technology with the characteristics of all-day, all-weather, and strong penetration. Therefore, it is applied in the field of ship detection.
[0034] Step S2, performing feature extraction on the synthetic aperture radar information to obtain a first feature vector, a second feature vector and a third feature vector, wherein the first feature vector, the second feature vector and the third feature vector have different sizes, and the first feature vector has the smallest size;
[0035] In this step, the method for extracting features from synthetic aperture radar information is not limited. It should be noted that the first eigenvector is the eigenvector with the smallest size, the size of the second eigenvector is larger than the first eigenvector, and the size of the third eigenvector is larger than the second eigenvector.
[0036] Step S3, sending the first feature vector to a receptive field module to obtain a fourth feature vector, and the receptive field module is used to expand the receptive field;
[0037] The step S3 also includes step S31, step S32, step S33 and step S34, which specifically include:
[0038] Step S31, sending the first feature vector to the maximum pooling layer to obtain a pooled feature vector;
[0039] Step S32, sending the pooled feature vector to the first convolution block, the second convolution block, the third convolution block and the fourth convolution block respectively, to obtain the sixth feature vector, the seventh feature vector, the eighth feature vector and the ninth feature vector, wherein the second convolution block and the third convolution block include a 3X3 dilated convolution;
[0040] In this step, after the first feature vector is max-pooled, it is divided into four parallel branches, specifically including a first convolution block, a second convolution block, a third convolution block and a fourth convolution block, wherein the first convolution block includes a 1×1 convolution, a batch normalization operation and a ReLU activation function; the second convolution block includes a 3×3 dilated convolution with a dilation rate of 5, followed by a batch normalization operation and a ReLU activation function; the third convolution block includes a 3×3 dilated convolution with a dilation rate of 10, followed by a batch normalization operation and a ReLU activation function; the fourth convolution block includes an adaptive average pooling layer, a 1×1 convolution, a batch normalization operation, a ReLU activation function and bilinear interpolation.
[0041] Step S33, concatenating the sixth eigenvector, the seventh eigenvector, the eighth eigenvector and the ninth eigenvector to obtain a concatenated eigenvector;
[0042] In this step, the feature branches from different receptive fields of the same feature layer are concatenated and fused to effectively share and transmit key high-level semantic information.
[0043] Step S34: Send the concatenated feature vector to the first activation layer to obtain the fourth feature vector.
[0044] In this step, the first activation layer includes 1×1 convolution, ReLU activation function, 1×1 convolution and Sigmoid activation function.
[0045] In this embodiment, due to the instance discontinuity and incompleteness caused by ship holes and regional fractures caused by the synthetic aperture radar imaging mechanism, it is necessary to supplement the missing ship structure information. Therefore, by sending the first eigenvector to the receptive field module for processing, a larger receptive field and global perspective are expanded, which prompts the detection network to focus on the overall information of the ship, reducing the risk of the detection frame drifting to holes and fracture areas, causing false alarms and positioning deviations, and resulting in a decrease in detection accuracy.
[0046] Step S4, sending the fourth feature vector to a position encoding module to obtain a fifth feature vector;
[0047] The step S4 also includes step S41, step S42 and step S43, which specifically include:
[0048] Step S41, obtaining an absolute position code;
[0049] The step S41 also includes step S411, step S412 and step S413, which specifically include:
[0050] Step S411: Acquire first information, where the first information includes a position index and a feature dimension index of a fourth feature vector;
[0051] Step S412, determining a characteristic dimension of the fourth characteristic vector according to the fourth characteristic vector;
[0052] Step S413: Calculate according to the first information and the feature dimension of the fourth feature vector to obtain the absolute position code.
[0053] In this embodiment, the specific method of obtaining the absolute position code is:
[0054] ;
[0055] In the above formula, and They represent the absolute position coding of even feature dimensions and the absolute position coding of odd feature dimensions respectively; i represents the feature dimension index of the fourth feature vector; Indicates the position index; represents the feature dimension of the fourth eigenvector.
[0056] Step S42, calculating three feature components of the attention mechanism according to the fourth feature vector and the absolute position code;
[0057] In this step, the three feature components of the attention mechanism are calculated as follows:
[0058] ;
[0059] In the above formula, , k, v represent the three feature components of the attention mechanism, query component, key component, and value component respectively; is the projection matrix of the query component, is the projection matrix of the key component, is the projection matrix of the value component; is the fourth eigenvector; Absolute position encoding.
[0060] Step S43, calculating based on the relative position encoding obtained by random initialization and the three feature components of the attention mechanism to obtain the fifth feature vector.
[0061] In this step, the fifth eigenvector is specifically:
[0062] ;
[0063] In the above formula, is the fifth eigenvector; is the activation function; represents the transposed matrix of the key components, Represents the transposed matrix of the relative position encoding; q and v are the query component and the value component respectively; It represents the number of feature dimensions assigned to each detection head. It should be noted that the relative position encoding is obtained by random initialization in the early stage of network model training, and then it is formed with the continuous iterative update of the network model. The whole process is only obtained by network training without the need for unnecessary linear transformation.
[0064] The traditional attention mechanism only considers absolute position information and ignores random relative position encoding, and cannot provide complete position information. Therefore, in this embodiment, in order to more accurately express and capture the position relationship in the self-attention mechanism, a learnable relative position encoding is embedded in the position encoding module to reveal more random relative position information.
[0065] Step S5: Detect the ship information to be detected in the synthetic aperture radar information according to the fifth eigenvector, the second eigenvector and the third eigenvector.
[0066] The step S5 also includes steps S51, S52, S53, S54, S55, S56, S57, S58, S59, S510 and S511, which specifically include:
[0067] Step S51, convolving the fifth eigenvector to obtain a tenth eigenvector;
[0068] In this step, the size of the convolution kernel is 1X1.
[0069] Step S52, upsampling the tenth eigenvector to obtain an eleventh eigenvector;
[0070] Step S53: sending the eleventh eigenvector and the second eigenvector to a multi-scale feature aggregation unit to obtain a twelfth eigenvector;
[0071] In this step, the multi-scale feature aggregation unit processes the eleventh eigenvector and the second eigenvector as follows: the eleventh eigenvector and the second eigenvector are concatenated, and the concatenated features are divided into three branches. The first branch and the third branch are sequentially subjected to 1×1 convolution, batch normalization operation, and Sigmoid activation function, and the second branch is directly the concatenated features; then the concatenated features are element-wise multiplied with the output of the first branch and the output of the third branch respectively; the features output by the third branch are then passed through two sub-branches, namely the first sub-branch and the second sub-branch, wherein the first sub-branch After 3×3 convolution, batch normalization, and GELU activation function, the branch is split into two small sub-branches, namely the third sub-branch and the fourth sub-branch. The third sub-branch undergoes 3×3 convolution, batch normalization, and GELU activation function; the fourth sub-branch undergoes 1×1 convolution, batch normalization, and GELU activation function, and then the outputs of the third and fourth sub-branches are added and then passed through the GELU activation function to obtain the feature output result; the feature output result is added to the second sub-branch and the first branch, and finally the twelfth feature vector is output after batch normalization and GELU activation function.
[0072] Step S54, upsampling the twelfth eigenvector to obtain a thirteenth eigenvector;
[0073] In this step, the twelfth eigenvector needs to be processed using a 1X1 convolution layer before upsampling it.
[0074] Step S55, sending the thirteenth eigenvector and the third eigenvector to the multi-scale feature aggregation unit to obtain a fourteenth eigenvector;
[0075] Step S56, convolving the fourteenth eigenvector to obtain a fifteenth eigenvector;
[0076] In this step, the size of the convolution kernel is 1X1.
[0077] Step S57, down-sampling the fifteenth eigenvector to obtain a sixteenth eigenvector;
[0078] Step S58, sending the sixteenth eigenvector and the twelfth eigenvector to the multi-scale feature aggregation unit to obtain a seventeenth eigenvector;
[0079] Step S59, down-sampling the seventeenth eigenvector to obtain an eighteenth eigenvector;
[0080] In this step, the seventeenth eigenvector needs to be processed using a 1X1 convolution layer before downsampling.
[0081] Step S510: sending the eighteenth eigenvector and the tenth eigenvector to the multi-scale feature aggregation unit to obtain a nineteenth eigenvector;
[0082] Step S511: Detect the ship information to be detected in the synthetic aperture radar information according to the fifteenth eigenvector, the seventeenth eigenvector and the nineteenth eigenvector.
[0083] In this embodiment, in the multi-scale feature extraction and fusion stage, the multi-scale feature aggregation unit combines a top-down and bottom-up dual-path strategy to better express the multi-scale features.
[0084] The step S511 also includes step S5111, step S5112, step S5113 and step S5114, which specifically include:
[0085] Step S5111, calculating second information of the predicted frame and the real frame, wherein the second information includes a scale-sensitive intersection-over-union ratio;
[0086] In this step, the calculation formula of the second information is specifically:
[0087] ;
[0088] In the above formula, represents the scale-sensitive intersection-over-union ratio, is the intersection-over-union ratio of the predicted box and the true box; C d Represents the centroid distance between the predicted box and the true box; C represents the diagonal length of the minimum circumscribed rectangle of the true box and the predicted box, and v represents the consistency measurement of the aspect ratio. represents a positive trade-off parameter corresponding to v; represents a measure of consistency in the ratio of length to width, Representation and corresponds to a positive trade-off parameter.
[0089] It should be noted that v, , , The specific calculation process is:
[0090] ;
[0091] ;
[0092] ;
[0093] ;
[0094] In the above formula, and Represent the length and width of the real box respectively; and Represent the length and width of the prediction box respectively; and Represents the length and width of the minimum bounding rectangle of the real box and the predicted box respectively.
[0095] Step S5112: calculating a loss function based on the second information;
[0096] In this step, the second information is introduced into the classification branch to prevent the pre-selected box with high classification score but low IoU from being selected. The final loss function is:
[0097] ;
[0098] In the above formula, and They are the pre-selected box loss and category loss of regression respectively; , Represent the pre-selected box and the real box respectively; and Represent the bounding box and category score of the pre-selected box respectively; and Represents the bounding box and category score of the true box respectively; The second information is scale-sensitive intersection-over-union.
[0099] Step S5113: train the detection model using the loss function to obtain a trained detection model;
[0100] Step S5114: Send the fifteenth eigenvector, the seventeenth eigenvector and the nineteenth eigenvector to the trained detection model respectively to obtain a detection result.
[0101] The traditional IoU does not directly consider the influence of aspect ratio and scale offset in its calculation method. Due to the inconsistency of the predicted boxes, some pre-selected boxes with high classification scores but low IoU with the true boxes are often selected, which increases the difficulty of regressing the pre-selected boxes. In this embodiment, a scale-sensitive IoU is designed and introduced into the classification branch to alleviate the inconsistency problem of predicted boxes between classification scores and position regression. After scale-sensitive IoU screening, high-quality initial query selection is provided for the decoder and network convergence is accelerated.
[0102] It should be noted that this implementation is performed on the synthetic aperture radar information ship SSDD dataset, using the average precision AP (Average Precision), AP 50 and AP 75As an evaluation index of ship detection accuracy. As shown in Table 1, compared with the comparative detection network model, the present invention has higher detection accuracy in ship detection performance.
[0103] Table 1 Comparison results of different detection network models on the SSDD dataset
[0104]
[0105] Embodiment 2:
[0106] like Figure 2 As shown, this embodiment provides a ship target detection system, the system includes an acquisition module 901, a first processing module 902, a second processing module 903, a third processing module 904 and a fourth processing module 905, which specifically include:
[0107] An acquisition module 901 is used to acquire synthetic aperture radar information, wherein the synthetic aperture radar information includes information of a ship to be detected;
[0108] A first processing module 902 is used to extract features from the synthetic aperture radar information to obtain a first feature vector, a second feature vector and a third feature vector, wherein the first feature vector, the second feature vector and the third feature vector have different sizes, and the first feature vector has the smallest size;
[0109] A second processing module 903 is used to send the first feature vector to a receptive field module to obtain a fourth feature vector, and the receptive field module is used to expand the receptive field;
[0110] A third processing module 904 is used to send the fourth feature vector to a position encoding module to obtain a fifth feature vector;
[0111] The fourth processing module 905 is used to detect the ship information to be detected in the synthetic aperture radar information according to the fifth eigenvector, the second eigenvector and the third eigenvector.
[0112] In a specific embodiment of the present disclosure, the second processing module further includes a pooling unit, a first processing unit, a splicing unit and a second processing unit, which specifically include:
[0113] A pooling unit, used for sending the first feature vector to a maximum pooling layer to obtain a pooled feature vector;
[0114] A first processing unit, configured to send the pooled feature vectors to a first convolution block, a second convolution block, a third convolution block, and a fourth convolution block, respectively, to obtain a sixth feature vector, a seventh feature vector, an eighth feature vector, and a ninth feature vector, wherein the second convolution block and the third convolution block include a 3X3 dilated convolution;
[0115] a concatenation unit, configured to concatenate the sixth eigenvector, the seventh eigenvector, the eighth eigenvector, and the ninth eigenvector to obtain a concatenated eigenvector;
[0116] The second processing unit is used to send the concatenated feature vector to the first activation layer to obtain the fourth feature vector.
[0117] In a specific implementation of the present disclosure, the third processing module further includes a first acquisition unit, a first calculation unit and a second calculation unit, which specifically include:
[0118] A first acquisition unit, used for acquiring an absolute position code;
[0119] A first computing unit, configured to compute three feature components of an attention mechanism according to the fourth feature vector and the absolute position encoding;
[0120] The second computing unit is used to perform calculation based on the relative position encoding obtained by random initialization and the three feature components of the attention mechanism to obtain the fifth feature vector.
[0121] In a specific implementation of the present disclosure, the first acquisition unit further includes a second acquisition unit, a third processing unit and a third calculation unit, which specifically include:
[0122] A second acquisition unit, configured to acquire first information, where the first information includes a position index and a feature dimension index of a fourth feature vector;
[0123] A third processing unit, configured to determine a feature dimension of a fourth feature vector according to the fourth feature vector;
[0124] The third calculation unit is used to perform calculation according to the first information and the feature dimension of the fourth feature vector to obtain the absolute position code.
[0125] In a specific embodiment of the present disclosure, the fourth processing module further includes a fourth processing unit, a fifth processing unit, a sixth processing unit, a seventh processing unit, an eighth processing unit, a ninth processing unit, a tenth processing unit, an eleventh processing unit, a twelfth processing unit, a thirteenth processing unit, and a fourteenth processing unit, which specifically include:
[0126] a fourth processing unit, configured to perform convolution on the fifth eigenvector to obtain a tenth eigenvector;
[0127] a fifth processing unit, configured to upsample the tenth eigenvector to obtain an eleventh eigenvector;
[0128] a sixth processing unit, configured to send the eleventh eigenvector and the second eigenvector to a multi-scale feature aggregation unit to obtain a twelfth eigenvector;
[0129] a seventh processing unit, configured to upsample the twelfth eigenvector to obtain a thirteenth eigenvector;
[0130] an eighth processing unit, configured to send the thirteenth eigenvector and the third eigenvector to the multi-scale feature aggregation unit to obtain a fourteenth eigenvector;
[0131] a ninth processing unit, configured to perform convolution on the fourteenth eigenvector to obtain a fifteenth eigenvector;
[0132] a tenth processing unit, configured to downsample the fifteenth eigenvector to obtain a sixteenth eigenvector;
[0133] an eleventh processing unit, configured to send the sixteenth eigenvector and the twelfth eigenvector to the multi-scale feature aggregation unit to obtain a seventeenth eigenvector;
[0134] a twelfth processing unit, configured to downsample the seventeenth eigenvector to obtain an eighteenth eigenvector;
[0135] a thirteenth processing unit, configured to send the eighteenth eigenvector and the tenth eigenvector to the multi-scale feature aggregation unit to obtain a nineteenth eigenvector;
[0136] The fourteenth processing unit is used to detect the ship information to be detected in the synthetic aperture radar information according to the fifteenth eigenvector, the seventeenth eigenvector and the nineteenth eigenvector.
[0137] In a specific implementation of the present disclosure, the fourteenth processing unit further includes a fourth computing unit, a fifth computing unit, a training unit, and a detection unit, which specifically include:
[0138] a fourth calculation unit, configured to calculate second information of the predicted frame and the real frame, wherein the second information includes a scale-sensitive intersection-over-union ratio;
[0139] a fifth calculating unit, configured to calculate a loss function based on the second information;
[0140] A training unit, used to train the detection model using a loss function to obtain a trained detection model;
[0141] The detection unit is used to send the fifteenth eigenvector, the seventeenth eigenvector and the nineteenth eigenvector to the trained detection model respectively to obtain a detection result.
[0142] It should be noted that, regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0143] Embodiment 3:
[0144] Corresponding to the above method embodiment, this embodiment further provides a ship target detection device. The ship target detection device described below and the ship target detection method described above can refer to each other.
[0145] Figure 3 FIG. 8 is a block diagram of a ship target detection device 800 according to an exemplary embodiment. Figure 3 As shown, the ship target detection device 800 may include: a processor 801 and a memory 802. The ship target detection device 800 may also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0146] The processor 801 is used to control the overall operation of the ship target detection device 800 to complete all or part of the steps in the above-mentioned ship target detection method. The memory 802 is used to store various types of data to support the operation of the ship target detection device 800, and these data may include, for example, instructions for any application or method operating on the ship target detection device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the ship target detection device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 may include: Wi-Fi module, Bluetooth module, NFC module.
[0147] In an exemplary embodiment, the ship target detection device 800 can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), digital signal processors (Digital Signal Processor, referred to as DSP), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), programmable logic devices (Programmable Logic Device, referred to as PLD), field programmable gate arrays (Field Programmable Gate Array, referred to as FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned ship target detection method.
[0148] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned ship target detection method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the ship target detection device 800 to complete the above-mentioned ship target detection method.
[0149] Embodiment 4:
[0150] Corresponding to the above method embodiment, a readable storage medium is also provided in this embodiment. The readable storage medium described below and the ship target detection method described above can be referred to each other.
[0151] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the ship target detection method of the above method embodiment.
[0152] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0153] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0154] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A ship target detection method, characterized in that: include: Acquiring synthetic aperture radar information, wherein the synthetic aperture radar information includes information of a ship to be detected; Performing feature extraction on the synthetic aperture radar information to obtain a first feature vector, a second feature vector, and a third feature vector, wherein the first feature vector, the second feature vector, and the third feature vector have different sizes, and the first feature vector has the smallest size; Sending the first feature vector to a receptive field module to obtain a fourth feature vector, wherein the receptive field module is used to expand the receptive field; Sending the fourth feature vector to a position encoding module to obtain a fifth feature vector; Detecting the ship information to be detected in the synthetic aperture radar information according to the fifth eigenvector, the second eigenvector and the third eigenvector; Wherein, detecting the ship information to be detected in the synthetic aperture radar information according to the fifth eigenvector, the second eigenvector and the third eigenvector includes: Convolving the fifth eigenvector to obtain a tenth eigenvector; Upsampling the tenth eigenvector to obtain an eleventh eigenvector; Sending the eleventh eigenvector and the second eigenvector to a multi-scale feature aggregation unit to obtain a twelfth eigenvector; Upsampling the twelfth eigenvector to obtain a thirteenth eigenvector; Sending the thirteenth eigenvector and the third eigenvector to the multi-scale feature aggregation unit to obtain a fourteenth eigenvector; Convolving the fourteenth eigenvector to obtain a fifteenth eigenvector; Downsampling the fifteenth eigenvector to obtain a sixteenth eigenvector; Sending the sixteenth eigenvector and the twelfth eigenvector to the multi-scale feature aggregation unit to obtain a seventeenth eigenvector; Downsampling the seventeenth eigenvector to obtain an eighteenth eigenvector; Sending the eighteenth eigenvector and the tenth eigenvector to the multi-scale feature aggregation unit to obtain a nineteenth eigenvector; Detecting the ship information to be detected in the synthetic aperture radar information according to the fifteenth eigenvector, the seventeenth eigenvector and the nineteenth eigenvector; Among them, the multi-scale feature aggregation unit processes the eleventh eigenvector and the second eigenvector specifically as follows: the eleventh eigenvector and the second eigenvector are concatenated, and the concatenated features are divided into three branches. The first branch and the third branch are successively subjected to 1×1 convolution, batch normalization operation, and Sigmoid activation function, and the second branch is directly the concatenated features; then the concatenated features are element-wise multiplied with the output of the first branch and the output of the third branch respectively; the features output by the third branch are then passed through two sub-branches, namely the first sub-branch and the second sub-branch, wherein the first sub-branch After 3×3 convolution, batch normalization, and GELU activation function, the first branch is split into two small sub-branches, namely the third sub-branch and the fourth sub-branch. The third sub-branch undergoes 3×3 convolution, batch normalization, and GELU activation function; the fourth sub-branch undergoes 1×1 convolution, batch normalization, and GELU activation function, and then the outputs of the third and fourth sub-branches are added and then passed through the GELU activation function to obtain the feature output result; the feature output result is added to the second sub-branch and the first branch, and finally the twelfth feature vector is output after batch normalization and GELU activation function.
2. The ship target detection method according to claim 1, characterized in that: Sending the first feature vector to a receptive field module includes: Sending the first feature vector to a maximum pooling layer to obtain a pooled feature vector; Sending the pooled feature vectors to the first convolution block, the second convolution block, the third convolution block, and the fourth convolution block respectively to obtain a sixth feature vector, a seventh feature vector, an eighth feature vector, and a ninth feature vector, wherein the second convolution block and the third convolution block include 3X3 dilated convolutions; concatenating the sixth eigenvector, the seventh eigenvector, the eighth eigenvector, and the ninth eigenvector to obtain a concatenated eigenvector; The concatenated feature vector is sent to the first activation layer to obtain the fourth feature vector.
3. The ship target detection method according to claim 1, characterized in that: Sending the fourth feature vector to a position encoding module includes: Get the absolute position code; Calculate three feature components of the attention mechanism according to the fourth feature vector and the absolute position encoding; The fifth eigenvector is obtained by calculating based on the relative position encoding obtained by random initialization and the three feature components of the attention mechanism.
4. A ship target detection system, characterized in that: include: An acquisition module, used for acquiring synthetic aperture radar information, wherein the synthetic aperture radar information includes information of a ship to be detected; A first processing module is used to extract features from the synthetic aperture radar information to obtain a first feature vector, a second feature vector and a third feature vector, wherein the first feature vector, the second feature vector and the third feature vector have different sizes, and the first feature vector has the smallest size; A second processing module, used for sending the first feature vector to a receptive field module to obtain a fourth feature vector, wherein the receptive field module is used for expanding the receptive field; A third processing module, used for sending the fourth feature vector to a position encoding module to obtain a fifth feature vector; a fourth processing module, configured to detect the ship information to be detected in the synthetic aperture radar information according to the fifth eigenvector, the second eigenvector and the third eigenvector; Wherein, the fourth processing module includes: a fourth processing unit, configured to perform convolution on the fifth eigenvector to obtain a tenth eigenvector; a fifth processing unit, configured to upsample the tenth eigenvector to obtain an eleventh eigenvector; a sixth processing unit, configured to send the eleventh eigenvector and the second eigenvector to a multi-scale feature aggregation unit to obtain a twelfth eigenvector; a seventh processing unit, configured to upsample the twelfth eigenvector to obtain a thirteenth eigenvector; an eighth processing unit, configured to send the thirteenth eigenvector and the third eigenvector to the multi-scale feature aggregation unit to obtain a fourteenth eigenvector; a ninth processing unit, configured to perform convolution on the fourteenth eigenvector to obtain a fifteenth eigenvector; a tenth processing unit, configured to downsample the fifteenth eigenvector to obtain a sixteenth eigenvector; an eleventh processing unit, configured to send the sixteenth eigenvector and the twelfth eigenvector to the multi-scale feature aggregation unit to obtain a seventeenth eigenvector; a twelfth processing unit, configured to downsample the seventeenth eigenvector to obtain an eighteenth eigenvector; a thirteenth processing unit, configured to send the eighteenth eigenvector and the tenth eigenvector to the multi-scale feature aggregation unit to obtain a nineteenth eigenvector; A fourteenth processing unit is used to detect the ship information to be detected in the synthetic aperture radar information according to the fifteenth eigenvector, the seventeenth eigenvector and the nineteenth eigenvector; Wherein, the sixth processing unit comprises: The multi-scale feature aggregation unit processes the eleventh eigenvector and the second eigenvector as follows: the eleventh eigenvector and the second eigenvector are concatenated, and the concatenated features are divided into three branches. The first branch and the third branch are sequentially subjected to 1×1 convolution, batch normalization operation, and Sigmoid activation function, and the second branch is directly the concatenated features; then the concatenated features are element-wise multiplied with the output of the first branch and the output of the third branch respectively; the features output by the third branch are then passed through two sub-branches, namely the first sub-branch and the second sub-branch, wherein the first sub-branch is subjected to After 3×3 convolution, batch normalization, and GELU activation function, it is split into two small sub-branches, namely the third sub-branch and the fourth sub-branch. The third sub-branch undergoes 3×3 convolution, batch normalization, and GELU activation function; the fourth sub-branch undergoes 1×1 convolution, batch normalization, and GELU activation function, and then the outputs of the third and fourth sub-branches are added together and then passed through the GELU activation function to obtain the feature output result; the feature output result is added to the second sub-branch and the first branch, and finally the twelfth feature vector is output after batch normalization and GELU activation function.
5. The ship target detection system according to claim 4, characterized in that: The second processing module comprises: A pooling unit, used for sending the first feature vector to a maximum pooling layer to obtain a pooled feature vector; A first processing unit, configured to send the pooled feature vectors to a first convolution block, a second convolution block, a third convolution block, and a fourth convolution block, respectively, to obtain a sixth feature vector, a seventh feature vector, an eighth feature vector, and a ninth feature vector, wherein the second convolution block and the third convolution block include a 3X3 dilated convolution; a concatenation unit, configured to concatenate the sixth eigenvector, the seventh eigenvector, the eighth eigenvector, and the ninth eigenvector to obtain a concatenated eigenvector; The second processing unit is used to send the concatenated feature vector to the first activation layer to obtain the fourth feature vector.
6. The ship target detection system according to claim 4, characterized in that: The third processing module comprises: A first acquisition unit, used for acquiring an absolute position code; A first computing unit, configured to compute three feature components of an attention mechanism according to the fourth feature vector and the absolute position encoding; The second computing unit is used to perform calculation based on the relative position encoding obtained by random initialization and the three feature components of the attention mechanism to obtain the fifth feature vector.
7. A ship target detection device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the ship target detection method as claimed in any one of claims 1 to 3 when executing the computer program.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the ship target detection method according to any one of claims 1 to 3 are implemented.
