Complex background SAR ship image generation method and device and storage medium
By introducing masks and multi-scale, semantic feature extraction and fusion networks into the SAR ship image generation method, combined with user interaction interface design, the problem of single image generation and time-consuming data labeling in the existing technology is solved, high-quality and multi-category SAR ship image generation is achieved, and the development of SAR image processing algorithms is promoted.
Patent Information
- Application Number
- CN202411892420.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-16
AI Technical Summary
The existing SAR ship image generation method is simple and fails to effectively consider background information, resulting in monotonous and small differences in the generated image, and data labeling is time-consuming and labor-intensive, hindering the development of SAR image processing algorithms.
A mask is introduced to determine the generation location of the target, and a multi-scale feature extraction and fusion network, a semantic feature extraction and fusion network are used, combined with user interaction interface design, and high-quality, multi-category SAR ship images are generated.
It realizes the generation of high-quality and multi-category SAR ship images, solves the problems of single generation images, fewer target types, and low generation quality, and greatly saves data labeling time, promoting the development of SAR image processing algorithms.
Smart Images

Figure CN120014428A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of SAR image processing, and in particular relates to a method, a device and a storage medium for generating a complex background SAR ship image. Background Art
[0002] As a high-resolution radar, Synthetic Aperture Radar (SAR) is widely used in agriculture, military and other fields due to its excellent detection capabilities. In the maritime field, SAR is generally used to monitor the marine environment, detect and track ship targets, etc. In order to better process marine SAR images, researchers have tried to use deep learning models and have made great breakthroughs. However, unlike optical images, the use of SAR images has strict restrictions and the amount of public data is small, which will lead to local optimal solutions in data-driven deep learning models, seriously hindering the development of SAR image processing algorithms. In addition, the targets in SAR images are generally in a more complex environment, and manual annotation of such images is also a time-consuming and laborious process. Considering these problems, we should vigorously develop SAR ship image generation methods to promote the advancement of image processing algorithms.
[0003] In recent years, with the introduction of various generative models, researchers have been constantly trying to apply them to the generation of SAR images. However, the existing SAR ship image generation methods are generally simple, usually only considering the position of the ship target, without considering the relevant information of the background, which will cause the generated image to be monotonous and the difference between different images is small. The present invention, on the one hand, introduces a mask to determine the generation position of different targets; on the other hand, uses a multi-scale feature extraction and fusion network, a semantic feature extraction and fusion network to achieve high-quality, multi-category SAR image generation. In addition, based on the proposed generation method, a user interactive interface design is designed and implemented, and the image generation and labeling process is simplified, so that the generated image can be directly applied to other image processing tasks, greatly saving the time for data processing. The invention provides new ideas and technical support for SAR image generation methods, and has important research value and research significance. Summary of the invention
[0004] In order to solve the above problems, the technical solution adopted by the present invention is: a method for generating a complex background SAR ship image, comprising the following steps:
[0005] Obtain public SAR ship images to build a dataset;
[0006] Divide the data set into training set and test set;
[0007] Construct a SAR ship image generation model for generating SAR ship images with complex backgrounds;
[0008] Based on the training set data, the SAR ship image generation model is trained to obtain a trained SAR ship image generation model;
[0009] The test set data is input into the trained SAR ship image generation model to generate SAR ship images with complex backgrounds.
[0010] Furthermore, the SAR ship image generation model includes
[0011] Preprocessing module: used to analyze the five-parameter target position information of the scene SAR ship image, generate masks corresponding to the target category in different dimensions, and realize the constraint of the target position in the generated image;
[0012] Multi-scale feature extraction and fusion network: used to capture multi-level features of the image after preprocessing module parsing;
[0013] Semantic feature extraction and fusion network: used to fuse the deep semantic information retained after feature extraction with the image and reconstruct it into a SAR pseudo image;
[0014] The discriminant network is used to judge the SAR false image output by the semantic feature extraction and fusion network.
[0015] Further, the five-parameter target position information includes, under the opencv definition method, the horizontal coordinate of the center point, the vertical coordinate of the center point, the length of the first side rotated counterclockwise from the horizontal axis, the length of the other side, and the angle between the horizontal axis and the first side rotated clockwise, wherein the angle is [-0.5π, 0];
[0016] The masks corresponding to the target categories are generated in different dimensions by setting the target label area to 1 and the rest to 0, then adding the target masks of the same category and stacking the target masks of different categories.
[0017] Furthermore, the multi-scale feature extraction and fusion network includes a multi-scale feature extraction network and a multi-scale feature fusion network;
[0018] The multi-scale feature extraction network is used to extract the features of the down-sampled SAR image and reconstruct it, capturing multi-level features from fine texture to coarse texture structure;
[0019] The multi-scale feature fusion network is used to perform residual learning and fusion on the multi-level features reconstructed by the multi-scale feature extraction network to obtain a feature map containing image information of different scales at the same time, so as to better express the characteristics of the target.
[0020] Further, the semantic feature extraction and fusion network includes a semantic feature extraction network, a semantic fusion network, and an output network;
[0021] The semantic feature extraction network is used to extract the features of the downsampled SAR image and reconstruct it, and retain the deep semantic information to understand the image content from a higher level;
[0022] The semantic fusion network is used to fuse the deep semantic information retained by the semantic feature extraction network with the image to learn the representation of the relationship between different objects;
[0023] The output network is used to reconstruct the feature map output by the semantic fusion network into a SAR pseudo image.
[0024] Furthermore, the multi-scale feature extraction network is used to extract the features of the downsampled SAR image and reconstruct it, and the process of capturing multi-level features from fine texture to coarse texture structure is as follows:
[0025] The low-dimensional feature map is downsampled by four 3×3 convolutions with a stride of 2 to obtain a high-dimensional feature map of 256×32×32. Nine residual blocks are used to extract features in the high dimension. Then, it is upsampled by four 3×3 convolutions with a stride of 2 in the same way as the downsampling process but in the opposite order to complete the reconstruction of the low-dimensional feature map of the image.
[0026] Furthermore, the process of reconstructing the image after feature extraction again into a SAR pseudo image by the semantic feature extraction and fusion network is as follows:
[0027] First, it will pass through a semantic feature extraction network with the same structure as the multi-scale feature extraction network, that is, it will use four 3×3 convolutions with a step size of 2 for downsampling to obtain a 256×32×32 high-dimensional feature map, and then pass through 9 residual blocks to extract features in high dimensions, and finally use four 3×3 convolutions with a step size of 2 for upsampling to complete reconstruction. The difference is that in the process of using residual block extraction, the output of the fifth residual block is retained as the deep semantic information between the targets;
[0028] The semantic information will be input into the semantic fusion network, decoded by three 3×3 convolutions with a step size of 1, and then the reconstructed feature map will be scaled and offset based on the decoded information to obtain a low-dimensional feature map containing semantic relationships.
[0029] Finally, the output network is used to adjust the channels and obtain a fake image of size 512×512.
[0030] A device for generating a complex background SAR ship image, comprising:
[0031] Building Module I: Obtaining public SAR ship images to build a dataset;
[0032] Partition module: used to divide the data set into training set and test set;
[0033] Building module II: used to build a SAR ship image generation model for generating SAR ship images with complex backgrounds;
[0034] Training module: used to train the SAR ship image generation model based on the training set data to obtain a trained SAR ship image generation model;
[0035] The test set data is input into the trained SAR ship image generation model to generate SAR ship images with complex backgrounds.
[0036] A system for generating SAR ship images with complex backgrounds, comprising:
[0037] Human-computer interaction module: used to input the category and location information of the target;
[0038] A device for generating a complex background SAR ship image: used for generating a complex background SAR ship image based on the category and position information of the target input into the human-computer interaction module;
[0039] Display module: used to display the SAR ship image with complex background;
[0040] Saving module: Save the process of generating complex background SAR ship images and input labels.
[0041] A readable storage medium stores a program module, wherein the program module is executed in a processor to implement any of the methods described above.
[0042] The present application discloses a method, device and storage medium for generating SAR ship images with complex backgrounds. First, the five-parameter rotating frame labels are parsed to generate a mask to determine the target generation position. Then, the complex background SAR ship images are generated through multi-scale feature extraction and fusion network, progressive fusion structure, semantic feature extraction and fusion network. Finally, the generation method is combined with a user interaction interface to simultaneously realize the production of labels. This method can greatly save the time of researchers in labeling and provide technical support for SAR image processing tasks.
[0043] The present invention provides a method for generating a complex background SAR ship image and a user interaction interface design, which can effectively solve the problems existing in the current SAR ship generation method, such as single generated image, few target types, low generation quality, and inability to accurately control the generation position of the target. At the same time, the user interaction interface design also solves the time-consuming and laborious problem of data annotation, effectively saves the time of researchers, provides technical support for SAR image processing algorithms, and has the following advantages:
[0044] 1. In order to accurately control the target generation position, the present invention introduces a mask containing different types of information. By analyzing the five-parameter coordinates of the target, different types of masks are generated in different dimensions to achieve accurate control of the target generation position.
[0045] 2. In order to solve the problems of single generated images, few target types and low generated quality, the present invention introduces a multi-scale feature extraction and fusion network and a semantic feature extraction and fusion network. The multi-scale feature extraction and fusion network is used to fuse features of different resolutions and make full use of the information of images at different scales; the semantic feature extraction and fusion network is used to process the relationship between targets and effectively improve the quality of generated images.
[0046] 3. In order to solve the time-consuming and labor-intensive problem of data labeling, the present invention implements the design of a user interaction interface based on the generation method proposed in the present invention. The user only needs to provide the location and category information of the target, and the interface will automatically save the generated image and the provided label. The result can be directly applied to other tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0048] Figure 1 Flowchart of the application method;
[0049] Figure 2 This is a structural diagram of the method for generating SAR ship images with complex backgrounds;
[0050] Figure 3 Figure 2 is a diagram of the mask generation process, where (a) is the visualization label, (b) is the land mask, (c) is the ocean background mask, (d) is the ship mask, and (e) is the total mask after stacking in different dimensions;
[0051] Figure 4Examples of parameters when defining a five-parameter rotation frame; (a) the angle is 60°, (b) the angle is 30°;
[0052] Figure 5 To generate experimental comparison diagrams, (a) is the real image visualization label, (b) is the real image, (c) is the image generated by CGAN, (d) is the image generated by Pix2pix, (e) is the image generated by SARGAN, and (f) is the image generated by the present invention;
[0053] Figure 6 Design diagrams for user interfaces;
[0054] Figure 7 These are the labels and fake image renderings generated through the user interaction interface, (a) Label and fake image rendering I, (b) Label and fake image rendering II. DETAILED DESCRIPTION
[0055] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0056] 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 only part of the embodiments of the present invention, not all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. 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.
[0057] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0058] Unless otherwise specifically stated, the relative arrangement of the parts and steps described in these embodiments, the numerical expressions and numerical values do not limit the scope of the present invention. At the same time, it should be clear that, for ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The technology, methods and equipment known to ordinary technicians in the relevant field may not be discussed in detail, but in appropriate cases, the technology, methods and equipment should be regarded as part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar numbers 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 discussed in subsequent drawings.
[0059] Figure 1 A flowchart of the application method;
[0060] A method for generating a complex background SAR ship image comprises the following steps:
[0061] S1: Obtain public SAR ship images and build a dataset;
[0062] S2: Divide the data set into training set and test set;
[0063] S3: constructing a SAR ship image generation model for generating SAR ship images with complex backgrounds;
[0064] S4: Based on the training set data, the SAR ship image generation model is trained to obtain a trained SAR ship image generation model;
[0065] S5: Input the test set data into the trained SAR ship image generation model to generate a complex background SAR ship image.
[0066] The steps S1 / S2 / S3 / S4 / S5 are performed sequentially;
[0067] Figure 2 Generate model structure diagram for SAR ship image;
[0068] The SAR ship image generation model includes
[0069] Preprocessing module: used to analyze the five-parameter target position information, generate masks corresponding to target categories in different dimensions, and implement constraints on the target positions in the generated images; the target categories are ships, land, and ocean;
[0070] Multi-scale feature extraction and fusion network: used to capture multi-level features of the image after preprocessing module parsing;
[0071] Semantic feature extraction and fusion network: used to fuse the deep semantic information retained after feature extraction with the image and reconstruct it into a SAR pseudo image to achieve the correlation between different targets;
[0072] The discriminant network is used to judge the SAR false image output by the semantic feature extraction and fusion network.
[0073] Furthermore, the five-parameter target position information is parsed according to the rotation bounding box label of the ship target in the existing SAR image. The five-parameter target position information includes the horizontal coordinate of the center point, the vertical coordinate of the center point, the length of the first side rotated counterclockwise by the horizontal axis, the length of the other side, and the angle between the horizontal axis and the first side rotated clockwise, and the angle range is [-0.5π, 0];
[0074] Generating masks corresponding to target categories in different dimensions means setting the target label area to 1 and the rest to 0, then performing a sum operation on target masks of the same category and performing a stacking operation on target masks of different categories.
[0075] Furthermore, the multi-scale feature extraction and fusion network includes a multi-scale feature extraction network and a multi-scale feature fusion network;
[0076] The multi-scale feature extraction network is used to extract the features of the down-sampled SAR image and reconstruct it, capturing multi-level features from fine texture to coarse texture structure;
[0077] The multi-scale feature fusion network is used to perform residual learning and fusion on the multi-level features reconstructed by the multi-scale feature extraction network to obtain a feature map containing image information of different scales at the same time, so as to better express the characteristics of the target.
[0078] The multi-scale feature extraction and fusion network and the semantic feature extraction and fusion network are cascaded using a progressive fusion structure. The previous step processing in the cascade structure will provide richer information for the next step, thereby improving the expression ability of the network.
[0079] Furthermore, the semantic feature extraction and fusion network includes a semantic feature extraction network, a semantic fusion network, and an output network;
[0080] The semantic feature extraction network is used to extract the features of the downsampled SAR image and reconstruct it, and retain the deep semantic information to understand the image content from a higher level;
[0081] The semantic fusion network is used to fuse the deep semantic information retained by the semantic feature extraction network with the image to learn the representation of the relationship between different objects;
[0082] The output network is used to reconstruct the feature map output by the semantic fusion network into a SAR false image;
[0083] The discriminant network is used to judge the SAR false image output by the output network to further improve the quality of the generated image.
[0084] Furthermore, the method for generating complex background SAR ship images proposed in the present invention realizes the design of a user interaction interface, in which the user inputs the category and location information of the target, and generates and saves the image and input labels through the SAR ship image generation method provided by the present invention. The saved data can be directly applied to other related tasks.
[0085] A device for generating a complex background SAR ship image, comprising:
[0086] Building Module I: Obtaining public SAR ship images to build a dataset;
[0087] Partition module: used to divide the data set into training set and test set;
[0088] Building module II: used to build a SAR ship image generation model for generating SAR ship images with complex backgrounds;
[0089] Training module: used to train the SAR ship image generation model based on the training set data to obtain a trained SAR ship image generation model;
[0090] The test set data is input into the trained SAR ship image generation model to generate SAR ship images with complex backgrounds.
[0091] A system for generating SAR ship images with complex backgrounds, comprising:
[0092] Human-computer interaction module: used to input the category and location information of the target;
[0093] A device for generating a complex background SAR ship image: used for generating a complex background SAR ship image based on the category and position information of the target input into the human-computer interaction module;
[0094] Display module: used to display SAR ship images with complex backgrounds;
[0095] Saving module: Save the process of generating complex background SAR ship images and input labels.
[0096] A readable storage medium stores a program module, wherein the program module can implement any of the methods described above when executed in a processor.
[0097] Example 1: The process of image generation is described based on a specific example of the method of the present application.
[0098] S1: Get manually annotated labels and real images,
[0099] S2: construct a dataset based on SAR ship images;
[0100] S3: Divide the data set into training set and test set;
[0101] S4: constructing a SAR ship image generation model for generating SAR ship images with complex backgrounds;
[0102] S5: Based on the training set data, the SAR ship image generation model is trained to obtain a trained SAR ship image generation model; the specific process is as follows:
[0103] Generate a mask for each category of target through coordinate analysis. Specifically, set the target label area to 1 and the rest to 0 to form a black and white mask. Then add the target masks of the same category and stack the target masks of different categories, such as Figure 3 Among them, (a) is the visualization label, (b) is the land mask, (c) is the ocean background mask, (d) is the ship mask, and (e) is the total mask after stacking in different dimensions;
[0104] The result of coordinate analysis is determined by formula (1), formula (2), formula (3) and formula (4).
[0105] x1,y1=cx-0.5×w×cosθ+0.5×h×sinθ,cy-0.5×w×sinθ-0.5×h×cosθ (1)
[0106] x2,y2=cx+0.5×w×cosθ+0.5×h×sinθ,cy+0.5×w×sinθ-0.5×h×cosθ (2)
[0107] x3,y3=cx+0.5×w×cosθ-0.5×h×sinθ,cy+0.5×w×sinθ+0.5×h×cosθ (3)
[0108] x4, y4=cx-0.5×w×cosθ-0.5×h×sinθ,cy-0.5×w×sinθ+0.5×h×cosθ (4)
[0109] Among them, cx, cy, w, h, θ represent the horizontal coordinate of the center point of the rotation box, the vertical coordinate of the center point, the length of the first side rotated counterclockwise by the horizontal axis, the length of the other side, and the angle between the horizontal axis and the first side rotated counterclockwise, such as Figure 4 As shown, the angle (a) is 60° and the angle (b) is 30°; 1(2,3,4) ,y 1(2,3,4) Represents the coordinates of the four corner points of the rotated box after parsing.
[0110] The generated mask image will be resized to 512×512, and then a 7×7 convolution is used to adjust the channels to generate a lower-dimensional feature map. The feature map is input into the multi-scale feature extraction network, and down-sampled by four 3×3 convolutions with a step size of 2 to obtain a 256×32×32 high-dimensional feature map. Nine residual blocks are used to extract features in high dimensions, and then up-sampled by four 3×3 convolutions with a step size of 2 in the same but opposite arrangement as the downsampling process to complete the reconstruction of the low-dimensional feature map of the image. The reconstructed result is input into the multi-scale feature fusion network. After the residual learning module, the details of the high-resolution features are extracted and restored from the low-resolution features. The details are fused with the reconstruction results after two 1×1 convolutions to obtain a feature map containing both high- and low-resolution information.
[0111] The feature map containing high and low resolution information is then fed into the semantic feature extraction and fusion network. The feature map first passes through a semantic feature extraction network with the same structure as the multi-scale feature extraction network, that is, it is downsampled using four 3×3 convolutions with a step size of 2 to obtain a high-dimensional feature map of 256×32×32, and then it passes through 9 residual blocks to extract features in high dimensions, and finally it is reconstructed by upsampling through four 3×3 convolutions with a step size of 2. The difference is that in the process of using residual blocks for extraction, the output of the fifth residual block is retained as the deep semantic information between the targets. The semantic information is input into the semantic fusion network, decoded through three 3×3 convolutions with a step size of 1, and then the reconstructed feature map is scaled and offset adjusted based on the decoded information to obtain a low-dimensional feature map containing semantic relations. Finally, it passes through the output network for channel adjustment to obtain a fake image of size 512×512. During the training process, the generated fake image is also input into the discriminant network, and the discriminant result is obtained through four 4×4 convolutions to improve the quality of the generated image.
[0112] For the multi-scale semantic feature extraction and fusion network and the semantic feature extraction and fusion network, the present invention adopts a progressive fusion structure for connection, such as Figure 2 As shown, this structure can better enhance the expressiveness of the network.
[0113] For the loss function in the discriminant network, the present invention uses three types of loss functions, namely, generating network loss L GAN , reconstruction loss L reconstructed image With the gradient variance loss L GVL , calculated using formula (5), formula (6) and formula (7).
[0114]
[0115] Among them, I R ,I G represents the real image and the generated image, and D(·) represents the discriminator.
[0116] L reconstructed image =||I real -I rec ||1 (6)
[0117] Among them I real ,I rec Represents the real image and the reconstructed image.
[0118]
[0119] in Represents the gradient variance matrix of the real image and the generated image in the horizontal and vertical directions.
[0120] The total loss function can be expressed as:
[0121] L total =λ1L GAN +λ2L reconstructed image +λ3L GVL (8)
[0122] Wherein λ1, λ2, λ3 represent the weight of each loss, which are set to 0.5, 0.4 and 0.1 in the present invention respectively.
[0123] S6: Input the test set data into the trained SAR ship image generation model to generate a complex background SAR ship image.
[0124] In order to prove that the method for generating complex background SAR ship images of the present invention can generate high-quality SAR images, the generation results are compared with those of CGAN, Pix2pix, and SARGAN. The results are shown in the following table:
[0125]
[0126] The generation experiment results show that the generation method proposed in this invention can improve the quality of the generated image. Figure 5 As shown in the figure, the quality of the images generated by the present invention is demonstrated by visualizing the SAR image generation results, where (a) is the real image visualization label, (b) is the real image, (c) is the image generated by CGAN, (d) is the image generated by Pix2pix, (e) is the image generated by SARGAN, and (f) is the image generated by the present invention.
[0127] In order to further prove the high quality of the images generated by the generation method of the present invention, the images generated by all the models in the generation experiment were tested using the Oriented R-CNN and Oriented reppoints detection models, and the results are as follows:
[0128]
[0129] The test results show that the quality of images generated by the generation method of the present invention is higher than that of other models and is second only to real images.
[0130] Based on the proposed method for generating SAR ship images with complex backgrounds, the present invention implements the design of a user interaction interface, which can greatly save the time required for annotating images. Figure 6 As shown in the figure, in the user interaction interface, the user can enter the location information of the target, i.e., the target category, center point coordinates, length, width and angle, at the corresponding position on the upper left side of the interface. Click the "confirm input" button to confirm the completion of a target input; click the "show rotated box" button to display the current input target position on the black interface on the left; click the "generate image" button to generate a fake image on the black interface on the right according to the input label, and save the label and the fake image at the same time; the "delete" button can delete the information of the previous target and re-enter it; each input target information will be displayed in the blank space below for user verification. In addition, the interface also provides three different generation methods for image generation to meet different needs. At the same time, it also provides a "file" button for users to save labels as files in different formats. Figure 7 The labels and fake image renderings generated through the user interaction interface, (a) Label and fake image rendering I, (b) Label and fake image rendering II, Figure 7 The results of two multi-target input tests are shown, and the generated images and their labels can be directly applied to other tasks.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a complex background SAR ship image, characterized in that: The following steps are involved: Obtain public SAR ship images to build a dataset; Divide the data set into training set and test set; Construct a SAR ship image generation model for generating SAR ship images with complex backgrounds; Based on the training set data, the SAR ship image generation model is trained to obtain a trained SAR ship image generation model; The test set data is input into the trained SAR ship image generation model to generate SAR ship images with complex backgrounds.
2. The method for generating a complex background SAR ship image according to claim 1, characterized in that: The SAR ship image generation model includes Preprocessing module: used to analyze the five-parameter target position information of the scene SAR ship image, generate masks corresponding to the target category in different dimensions, and realize the constraint of the target position in the generated image; Multi-scale feature extraction and fusion network: used to capture multi-level features of the image after preprocessing module parsing; Semantic feature extraction and fusion network: used to fuse the deep semantic information retained after feature extraction with the image and reconstruct it into a SAR pseudo image; The discriminant network is used to judge the SAR false image output by the semantic feature extraction and fusion network.
3. The method for generating a complex background SAR ship image according to claim 1, characterized in that: The five-parameter target position information includes, under the opencv definition method, the horizontal coordinate of the center point, the vertical coordinate of the center point, the length of the first side rotated counterclockwise from the horizontal axis, the length of the other side, and the angle between the horizontal axis and the first side rotated clockwise, wherein the angle is [-0.5π, 0]; The masks corresponding to the target categories are generated in different dimensions by setting the target label area to 1 and the rest to 0, then adding the target masks of the same category and stacking the target masks of different categories.
4. The method for generating a complex background SAR ship image according to claim 1, characterized in that: The multi-scale feature extraction and fusion network includes a multi-scale feature extraction network and a multi-scale feature fusion network; The multi-scale feature extraction network is used to extract the features of the down-sampled SAR image and reconstruct it, capturing multi-level features from fine texture to coarse texture structure; The multi-scale feature fusion network is used to perform residual learning and fusion on the multi-level features reconstructed by the multi-scale feature extraction network to obtain a feature map containing image information of different scales at the same time, so as to better express the characteristics of the target.
5. The method for generating a complex background SAR ship image according to claim 1, characterized in that: The semantic feature extraction and fusion network includes a semantic feature extraction network, a semantic fusion network, and an output network; The semantic feature extraction network is used to extract the features of the downsampled SAR image and reconstruct it, and retain the deep semantic information to understand the image content from a higher level; The semantic fusion network is used to fuse the deep semantic information retained by the semantic feature extraction network with the image to learn the representation of the relationship between different objects; The output network is used to reconstruct the feature map output by the semantic fusion network into a SAR pseudo image.
6. The method for generating a complex background SAR ship image according to claim 4, characterized in that: The multi-scale feature extraction network is used to extract the features of the down-sampled SAR image and reconstruct it. The process of capturing multi-level features from fine texture to coarse texture structure is as follows: The low-dimensional feature map is downsampled by four 3×3 convolutions with a stride of 2 to obtain a high-dimensional feature map of 256×32×32. Nine residual blocks are used to extract features in the high dimension. Then, it is upsampled by four 3×3 convolutions with a stride of 2 in the same way as the downsampling process but in the opposite order to complete the reconstruction of the low-dimensional feature map of the image.
7. The method for generating a complex background SAR ship image according to claim 5, characterized in that: The process of reconstructing the image after feature extraction again into a SAR pseudo image by the semantic feature extraction and fusion network is as follows: First, it will pass through a semantic feature extraction network with the same structure as the multi-scale feature extraction network, that is, it will use four 3×3 convolutions with a step size of 2 for downsampling to obtain a 256×32×32 high-dimensional feature map, and then pass through 9 residual blocks to extract features in high dimensions, and finally use four 3×3 convolutions with a step size of 2 for upsampling to complete reconstruction. The difference is that in the process of using residual block extraction, the output of the fifth residual block is retained as the deep semantic information between the targets; The semantic information will be input into the semantic fusion network, decoded by three 3×3 convolutions with a step size of 1, and then the reconstructed feature map will be scaled and offset based on the decoded information to obtain a low-dimensional feature map containing semantic relationships. Finally, the output network is used to adjust the channels and obtain a fake image of size 512×512.
8. A device for generating SAR ship images with complex backgrounds, characterized in that: include: Building Module I: Obtaining public SAR ship images to build a dataset; Partition module: used to divide the data set into training set and test set; Building module II: used to build a SAR ship image generation model for generating SAR ship images with complex backgrounds; Training module: used to train the SAR ship image generation model based on the training set data to obtain a trained SAR ship image generation model; The test set data is input into the trained SAR ship image generation model to generate SAR ship images with complex backgrounds.
9. A system for generating SAR ship images with complex backgrounds, characterized in that: include: Human-computer interaction module: used to input the category and location information of the target; A device for generating a complex background SAR ship image: used for generating a complex background SAR ship image based on the category and position information of the target input into the human-computer interaction module; Display module: used to display the SAR ship image with complex background; Saving module: Save the process of generating complex background SAR ship images and input labels.
10. A readable storage medium storing a program module, characterized in that: The program module is executed in a processor to implement the method according to any one of claims 1 to 7.