Weakly supervised sar image target detection method based on constant false alarm rate and cam
By combining constant false alarm detection with CAM, and utilizing the statistical characteristics and class activation maps of SAR images, image-level labels are updated, solving the problems of false alarms and redundancy in ship target detection in spaceborne SAR images, and achieving efficient weakly supervised target detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHWESTERN POLYTECHNICAL UNIV
- Filing Date
- 2024-03-19
- Publication Date
- 2026-07-24
AI Technical Summary
In spaceborne SAR images, ship target detection is difficult due to the fact that the number of target pixels is much lower than the number of background pixels and is affected by sea clutter. Existing methods require a lot of manual annotation, making it difficult to effectively perform ship target detection under weak supervision.
A weakly supervised SAR image target detection method using constant false alarm rate (CFAR) and CAM is proposed. Candidate regions are obtained through a feature extraction network, and image-level labels are updated by combining class activation maps and deep learning networks to reduce the false alarm rate and improve detection accuracy.
It effectively avoids candidate region redundancy, improves detection accuracy and recall, reduces false alarm rate, and enhances the ship target detection effect under image-level annotation.
Smart Images

Figure CN118247653B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of synthetic aperture radar ship target recognition technology, and particularly relates to a weakly supervised SAR image target detection method based on constant virtual detection and CAM. Background Technology
[0002] Synthetic Aperture Radar (SAR) imagery for ship target detection plays a crucial role in maritime target perception and intelligence reconnaissance. Deep learning-based image target detection is already well-established and widely applied; therefore, deep learning-based image target detection methods have also been applied to SAR imagery for ship target detection, achieving excellent results.
[0003] However, these methods are all data-driven, requiring a large number of accurate instance-level annotations. In spaceborne SAR images, the number of pixels occupied by targets is far less than the number of pixels in the background. In addition, due to the influence of sea clutter, some background and targets are difficult to distinguish. Therefore, manual annotation is a huge workload and difficult, requiring a large amount of manpower.
[0004] In weakly supervised target detection tasks, the annotation information consists only of image-level labels, lacking annotation information for target instances within the image, which significantly reduces the cost of manual annotation. For the problem of ship target detection in SAR images under weak supervision, the training set images have two types of labels: with ship present and without ship present. How to detect ship targets in SAR images with only image-level annotations is a pressing problem that needs to be solved. Summary of the Invention
[0005] The purpose of this invention is to provide a weakly supervised SAR image target detection method based on constant virtual detection and CAM, which can increase the accuracy of detection instances.
[0006] The present invention adopts the following technical solution: a weakly supervised SAR image target detection method based on constant virtual detection and CAM, which is implemented by a weakly supervised target detection network, including a feature extraction network;
[0007] Includes the following steps:
[0008] A feature extraction network is used to extract depth features from the SAR image to be detected, and a virtual constant detector is used to generate candidate regions in the SAR image to be detected.
[0009] Extract local depth features corresponding to candidate regions from the depth features;
[0010] The classification detection results and classification contribution of local depth features are generated respectively;
[0011] By fusing the classification detection results and classification contribution, image-level labels for the SAR image to be detected are obtained.
[0012] Preferably, during the training of the weakly supervised target detection network, the image-level labels of SAR images are jointly determined by the virtual detector and the scene classification network.
[0013] Preferably, determining the image-level label of a SAR image includes:
[0014] Obtain the class activation map output by the scene classification network;
[0015] The first region label output by the virtual detector is corrected according to the class activation map to obtain the second region label;
[0016] By fusing the second region label, the image-level label of the SAR image is obtained.
[0017] Preferably, the first region label of the constant virtual detector output is corrected according to the class activation map, including:
[0018] The scores of candidate regions output by the virtual detector are calculated based on the class activation map; the score is calculated as follows:
[0019]
[0020] In the formula, Score is the score, and λ is the hyperparameter. This represents the average pixel value of the candidate region in the corresponding region of the class activation map.
[0021] Preferably, the fusion of classification detection results and classification contribution includes:
[0022] Perform a SoftMax operation on the classification detection results to obtain the operation result σ. cls (p c );
[0023] Perform a SoftMax operation on the classification contribution to obtain the result σ. det (p d );
[0024] For σ cls (p c ) and σ det (p d Perform the Hadmard product operation to obtain the score of the candidate region.
[0025] Preferably, the operation result σ cls (p c The calculation method for ) is as follows:
[0026]
[0027] Among them, [σ cls (p c )] ij For σ cls (p c The element in the i-th column and j-th row of ) For the classification detection result p c The element in the i-th column and j-th row.
[0028] Preferably, the operation result σ det (p d The calculation method for ) is as follows:
[0029]
[0030] Among them, [σ det (p d )] ij For σ det (p d The element in the i-th column and j-th row of ) For the contribution of classification p d The element in the i-th column and j-th row.
[0031] Preferably, the loss function for a weakly supervised object detection network is:
[0032]
[0033] Where L represents the loss function, y mk p represents the probability that the m-th training image belongs to the k-th class. mk represents the predicted probability of a weakly supervised object detection network that the m-th training image belongs to the k-th class, and bs represents the number of training images.
[0034] Preferably, the loss function of the scene classification network is:
[0035]
[0036] Where loss represents the loss function of the scene classification network, and y represents the true label of the training image. This represents the predicted labels of the scene classification network for the training images.
[0037] Another technical solution of the present invention: a weakly supervised SAR image target detection device based on constant virtual detection and CAM, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0038] The beneficial effects of this invention are: This invention extracts image features through weakly supervised target detection, obtains target candidate regions by combining them with a constant virtual detector, and then combines the two for subsequent target detection processes. This can effectively avoid classifying candidate regions that only contain the target part as targets when classifying the candidate regions in the subsequent process, thereby increasing the accuracy of candidate region detection. Attached Figure Description
[0039] Figure 1 This is a flowchart of a weakly supervised SAR image target detection method based on constant virtual detection and CAM in an embodiment of the present invention;
[0040] Figure 2 This is a schematic diagram of ship type data used in the verification embodiments of the present invention;
[0041] Figure 3 This is a schematic diagram of the shipless data used in the verification embodiments of the present invention;
[0042] Figure 4 This is a comparison diagram of the original image and the corresponding class activation map in the verification embodiment of the present invention. Detailed Implementation
[0043] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0044] Constant false alarm rate (CFAR) detection performs target detection based on the statistical characteristics of SAR images without labeling. The CFAR detector unit consists of three regions: a test region, a protection region, and a training region. The test region contains the signal to be detected; the protection region separates the test region from the training region to prevent target signals from entering the training region and affecting the parameter estimation of background clutter; the training region contains background clutter signals. Based on the training region signals, statistical modeling of the background clutter is performed to estimate the parameters of the distribution followed by the background clutter, and the probability density function of the background clutter in the current training region is obtained using the estimated parameters. Under constant false alarm rate, a threshold is calculated, and the signal in the test region is compared with the threshold to determine whether the signal belongs to a target.
[0045] Constant false alarm detection (CFAD) algorithms treat each pixel in a SAR image as a single-point signal. Based on hypothesis testing and local clutter statistical distribution model estimation, they calculate the segmentation threshold for test points under certain significance levels, thus classifying image pixels into two main categories: foreground and background. Because these algorithms perform pixel-level surface detection and do not fully utilize the structural characteristics between pixels in the image, the detection results are prone to producing a large number of false alarms.
[0046] Weakly supervised object detection algorithms can be divided into methods based on multi-instance learning and methods based on class activation maps. Methods based on multi-instance learning utilize selective search or bounding boxes to obtain candidate regions. All candidate regions in each image constitute an instance bag, and the image-level label is the label for this instance bag. The image-level label is then used in conjunction with a deep feature extraction network to classify the instances within the instance bag.
[0047] For a single target, the multi-instance learning method will generate multiple recommendation regions. The redundant recommendation regions cause the network's learning process to focus on the part of the target that is of most interest, resulting in the final detection box containing only a part of the ship target.
[0048] Class activation map-based methods utilize image-level labels to learn a classification network. The final layer of the network extracts features, resulting in a class activation map. Regions with high responses in the class activation map are considered to be the target's location. Class activation map-based methods are primarily used for single-target detection tasks; however, they are prone to missed detections when there are multiple targets in the image.
[0049] Therefore, this invention utilizes constant false alarm detection to obtain candidate regions to solve the problem of redundant candidate boxes obtained by selective search. By leveraging the consistency between constant false alarm detection and class activation maps, it distinguishes between images with only ship targets in the instance package and images with both ship targets and backgrounds in the instance package, thus solving the problem of inaccurate labels. Finally, it uses the updated image-level labels to train a weakly supervised target detection network based on deep learning to reduce false alarms in constant false alarm detection.
[0050] The target detection method disclosed in this invention belongs to the field of deep learning and target detection technology. In practical applications, it is difficult to obtain a large number of SAR images with instance-level annotations. Therefore, ship target detection in SAR images under weak supervision is a challenging task with broad application needs.
[0051] This invention discloses a weakly supervised SAR image target detection method based on constant virtual detector (CVD) and CAM. The method employs a weakly supervised target detection network, which includes a feature extraction network. The method comprises the following steps: extracting depth features from the SAR image to be detected using the feature extraction network; generating candidate regions in the SAR image using a CVD; extracting local depth features corresponding to the candidate regions from the depth features; generating classification detection results and classification contribution values for the local depth features; and fusing the classification detection results and classification contribution values to obtain an image-level label for the SAR image to be detected.
[0052] This invention extracts image features through weakly supervised target detection, combines them with a constant virtual detector to obtain target candidate regions, and then combines the two for subsequent target detection processes. This can effectively avoid classifying candidate regions that only contain the target portion as targets when classifying the candidate regions later, thereby increasing the accuracy of candidate region detection.
[0053] This invention utilizes a constant virtual detection method (i.e., constant virtual detector) based on the statistical characteristics of SAR images to obtain candidate regions. Based on the class activation map obtained by the scene classification network (such as a classification network based on multiplicative feature fusion, ResNet50, and DenseNet), if the two have consistent detection results, the image-level label is updated according to the detection result. Finally, based on the candidate regions obtained by constant virtual detection and the updated labels, the detection of ship targets in weakly supervised SAR images is completed in a weakly supervised depth detection network.
[0054] In other words, during the training process of the weakly supervised target detection network in this invention, the image-level labels of SAR images are jointly determined by the constant virtual detector and the scene classification network.
[0055] More specifically, determining the image-level label of a SAR image includes: obtaining the class activation map output by the scene classification network; correcting the first region label output by the virtual detector based on the class activation map to obtain the second region label; and fusing the second region label to obtain the image-level label of the SAR image.
[0056] During the training phase of constant virtual detection, a batch of background SAR images is first used to select a background clutter distribution model. Specifically, based on the statistical modeling of the SAR images used, multiple distributions are fitted, and the Kolmogorov-Smirnov test is used to evaluate the fitting accuracy of each statistical distribution model to the real SAR image data, selecting the distribution model that best matches the SAR image.
[0057] During the testing phase, after determining the statistical distribution model followed by the SAR image data, the parameters of the statistical distribution model are estimated based on the data in the training area, ultimately obtaining the probability density function of background clutter in the training area. Under a given constant false alarm rate (CFAR) for SAR image detection, a segmentation threshold is obtained. CFAR detection determines whether each pixel belongs to the target based on the threshold; if it is a target, the pixel value is labeled 1, otherwise 0, resulting in a binary segmentation map. Using a connected component method, the bounding boxes of connected components in the binary segmentation map are obtained; these bounding boxes are the candidate regions.
[0058] In weakly supervised object detection tasks, image-level labels use One-Hot encoding. A category label of 1 indicates that the image contains an object of that class, meaning that the corresponding instance bag contains instances of that class. Weakly supervised object detection based on multi-instance learning typically classifies instances in the instance bag based on image-level labels.
[0059] Unlike conventional weakly supervised target detection, SAR image detection results only fall into two categories: background and target (e.g., ships). The background instance set contains only background data. However, CFAR-detected ship instance sets contain two scenarios: the first (images with simple backgrounds) yields accurate bounding boxes, while the second (images with complex backgrounds) will produce false alarms (i.e., background data) in addition to the target.
[0060] Therefore, depending on the complexity of the background, the instance package corresponding to an image with a simple background will contain only ships, while the instance package corresponding to an image with a complex background will contain both ships and background.
[0061] The image-level label for background images is (1,0), where "1" indicates the presence of a background and "0" indicates the absence of a target. However, if all image-level labels for images containing ships are (0,1), it means the image contains no background and only the target, i.e., the entire image is filled with the target. Such images are detrimental to network learning. Therefore, it is necessary to update the labels for images containing ships using the consistency between the class activation map and the imaginary constant detection, to distinguish between images with simple and complex backgrounds.
[0062] The class activation map is obtained from the classification network. In this embodiment of the invention, a Multiplicative Feature Fusion Net (MFF-Net) is used as the scene classification network. During the training phase, the network input is a SAR image x and its image-level label y. For background class images, y = 0, and for ship class images, y = 1. The network output is the prediction score. Backpropagation is performed using binary cross-entropy loss to optimize the weights of the scene classification network. The loss function is shown below:
[0063]
[0064] Where loss represents the loss function of the scene classification network, and y represents the true label of the training image. This represents the predicted label of the scene classification network for the training image. After the scene classification network is trained, a SAR image of size [800, 800, 3] is input into the trained scene classification network to obtain a class activation map of size [800, 800].
[0065] Since regions in the class activation map that contribute significantly to a particular class of the image will have a larger response, the pixel values at the corresponding locations in the class activation map will be larger.
[0066] If the constant virtual detection (CVD) results in a high response in the corresponding class activation map of an image, it is considered that there are no false alarms in the candidate boxes obtained by CVD, that is, all instances in the image are targets. Otherwise, it is considered that both targets and backgrounds exist in the instances in the image.
[0067] Therefore, scores are assigned to the candidate boxes obtained by the constant-virtual detector based on the class activation map. After obtaining the class activation map, the scores of the candidate regions output by the constant-virtual detector are calculated based on the class activation map, that is, the scores of the candidate regions (each instance) in each instance bag are calculated using the class activation map. The calculation formula is as follows:
[0068]
[0069] Where Score is the score. λ is the average pixel value of the candidate region in the class activation map (CAM), and λ is a hyperparameter.
[0070] When all recommended regions in an image containing a ship have a score greater than 0.5, the image is considered to contain only positive examples in its instance set, and the label of the image is changed to [0,1]. When there is a recommended region in an image containing a ship with a score equal to 0.5, the image is considered to contain both positive and negative examples in its instance set, and the label of the image is changed to [1,1].
[0071] Next, based on the candidate regions obtained from constant-false alarm detection (CVD) and the new image-level labels, a weakly supervised deep learning-based object detection network is trained. Since CVD performs pixel-by-pixel detection based on statistical properties, it can generate false alarms. Deep networks can extract higher-level features from candidate regions, thereby distinguishing ship targets from the background within those regions.
[0072] The entire weakly supervised object detection network is built based on WSDDN, where the candidate region generation module in WSDDN is replaced by CFAR detection. CFAR detection is used to obtain higher-quality candidate regions, mitigating the inaccuracy caused by redundant candidate regions obtained by selective search or edge box methods. Simultaneously, the image-level labels of images containing ships are updated based on the consistency between the CFAR detection results and the CAM (Camera Detection and Analysis). Finally, the updated image-level labels and the candidate regions obtained from CFAR are used to train the WSDDN network. The WSDDN network classifies candidate regions based on the learned differences in depth features between the background and the ship target within the candidate regions.
[0073] like Figure 1As shown, the WSDDN network mainly consists of a feature extraction network, region of interest pooling, and detection and classification branches. For the input image x, n candidate regions R = (R1, R2, ..., Rn) are obtained after constant imaginary detection. n The depth features f of the entire image are obtained through a feature extraction network. g f g The candidate region R is pooled with the region of interest to obtain the corresponding feature f. l =(f l_1 ,f l_2 ,...,f l_n ), then f l After passing through a fully connected layer, the input is simultaneously fed into two branches (classification and detection branches). The output of the classification branch is p. c , representing a ship or background. The output of the detection branch is p. d The output consists of two columns of values. The first column represents the contribution of each region to the image being classified as background, and the second column represents the contribution of each region to the image being classified as background. c and p d All are in the form of n×2, where n represents the number of candidate regions.
[0074] For example, when When the probability is 0.6, it means that there are four candidate regions in the image. The probability of the first candidate region belonging to the background is 0.6, and the probability of it belonging to the target is 0.4; the probability of the second candidate region belonging to the background is 0.3, and the probability of it belonging to the target is 0.7; the probability of the first candidate region belonging to the background is 0.5, and the probability of it belonging to the target is 0.5; the probability of the first candidate region belonging to the background is 0.1, and the probability of it belonging to the target is 0.9. If the value is 0, it means that there are four candidate regions in the image. The first candidate region contributes 0.3 to the background and 0.5 to the target. The second region contributes 0.4 to the background and 0.1 to the target. The third region contributes 0.1 to the background and 0.2 to the target. The fourth region contributes 0.2 to the background and 0.2 to the target.
[0075] In this embodiment of the invention, fusing classification detection results and classification contribution includes: performing a SoftMax operation on the classification detection results to obtain the operation result σ. cls (p c Perform a SoftMax operation on the classification contribution to obtain the result σ. det (p d ); for σ cls (p c ) and σdet (p d Perform the Hadmard product operation to obtain the score of the candidate region.
[0076] The difference between the two branches is that in the classification branch, each recommendation region is independent, and its category score is calculated separately; in the detection branch, each category is independent, and the score for each category's different recommendation regions is calculated separately for p. c With p d Perform SoftMax operations by category and by recommended region respectively.
[0077] That is, the operation result σ cls (p c The calculation method for ) is as follows:
[0078]
[0079] Among them, [σ cls (p c )] ij For σ cls (p c The element in the i-th column and j-th row of ) For the classification detection result p c The element in the i-th column and j-th row represents the score of the j-th candidate region belonging to the i-th class.
[0080] Operation result σ det (p d The calculation method for ) is as follows:
[0081]
[0082] Among them, [σ det (p d )] ij For σ det (p d The element in the i-th column and j-th row of ) For the contribution of classification p d The element in the i-th column and j-th row represents the contribution of the j-th candidate region to the image belonging to the i-th class.
[0083] Perform the Hadmard product operation on the two scores according to the recommended region dimension to obtain the final score p for each region. r p r The size is n×2, where n represents the number of candidate regions, and can be represented as follows:
[0084] p r =σ cls (p c )⊙σ det (p d(5)
[0085] Finally, the image-level prediction score p is obtained by summing the scores of all regions:
[0086]
[0087] Next, the updated image-level labeled supervised network is trained, with the loss function defined as follows:
[0088]
[0089] Where L represents the loss function, bs represents the number of training images, and y mk p represents the probability that the m-th training image belongs to the k-th class, and p represents the label of the k-th class corresponding to the updated one-hot label of the training image. mk This represents the predicted probability of a weakly supervised object detection network that the m-th training image belongs to the k-th class. The network weights are optimized through backpropagation of the loss. The network is optimized using the SGD optimizer with a learning rate of 0.0001, a momentum of 0.9, and other parameters set to default.
[0090] During the testing phase, based on the final score of each candidate region... Classify the candidate regions. This represents the final score of the i-th candidate region in the network's final output. This score represents the area belonging to the background. This represents the score indicating that the area belongs to a ship target. When When the recommended area is categorized as background, At that time, the recommended area was classified as a ship target.
[0091] This deep learning-based weakly supervised target detection network learns the structural differences between ship targets and the background, further classifies candidate regions, reduces false alarms in candidate regions, and improves detection accuracy.
[0092] This invention employs a weakly supervised SAR image ship target detection framework based on constant virtual detection and class activation map to achieve SAR image ship target detection under image-level annotation. By using constant virtual detection, the quality of candidate regions is improved and the redundancy problem of candidate regions is solved. At the same time, a scene classification network is used to obtain a class activation map. By utilizing the consistency between constant virtual detection and class activation map, images with ships are further divided, and finally, false alarms in the candidate regions are filtered out.
[0093] To verify the effectiveness of the method of the present invention, it was compared with several mainstream weakly supervised target detection algorithms, including WSDDN, OICR, D-MIL, CAM, and MFF.
[0094] The SAR images used in the verification process were taken from the publicly available SAR ship detection dataset HRSID, and experimental verification was conducted using SAR images acquired by Sentinel-1B within it. Figure 2 The diagram shown is a schematic representation of ship data used in this embodiment. Figure 3 The image shown is a schematic diagram of the non-ship data used in this embodiment. Figure 4 This is a comparison map of the original image and its corresponding class activation map.
[0095] During the training phase, there were 399 background images and 576 images containing boats. The test set consisted of 1730 images containing boats, with each image size being 800*800.
[0096] The detection results can be categorized into four cases: TP (TruePositive) FP (False Negative) TN (TrueNegative) FP (FalsePositive) TN (TrueNegative) FP (FalsePositive) TN (TrueNegative) The formulas for calculating accuracy (P) and recall (R) are as follows:
[0097]
[0098]
[0099] The F1-Score combines accuracy and recall, and its calculation formula is as follows:
[0100]
[0101] In object detection tasks, for each category, the model outputs a series of predicted bounding boxes, each with a confidence score. Precision and recall are calculated under certain confidence thresholds. The setting of the confidence threshold affects precision and recall; the lower the confidence threshold, the higher the recall, and the lower the precision. The mAP metric yields different precision and recall rates depending on the confidence threshold, allowing the plotting of a precision-recall (PR) curve. The area under the curve is then calculated to obtain the average precision for that category. The formula is as follows:
[0102]
[0103] Where AP represents the detection accuracy of the category, dR represents the integral over R, and P(R) represents the curve with R as the x-axis and P as the y-axis.
[0104] The average AP across all categories is used to obtain mAP.
[0105] Tables 1-3 show the detection performance of the proposed method and the comparative method under different Intersection over Union (IoU) thresholds. Comparison with classical methods shows that the proposed method achieves the highest overall scores in both F1-Score and mAP. The proposed method uses CFAR to acquire candidate regions, resulting in more accurate candidate regions and effectively reducing the number of candidate regions while maintaining recall. By combining with CAM to update image-level labels, a weakly supervised object detection network is used to reduce false alarms and improve accuracy.
[0106] Furthermore, it can be seen that the recall rate of the comparison method fluctuates relatively greatly with changes in the IOU threshold, indicating that the comparison method has a problem with inaccurate detection. In summary, compared with other methods, the method of this invention improves the detection accuracy while maintaining recall.
[0107] Table 1. Detection results of the present invention and the comparative method (IOU>0.5)
[0108]
[0109] Table 2. Detection results of the present invention and the comparative method (IOU>0.4)
[0110]
[0111] Table 3. Detection results of the present invention and the comparative method (IOU>0.3)
[0112]
[0113] This invention proposes a weakly supervised SAR image ship target detection algorithm based on statistical characteristics and label updates. For SAR image ship target detection tasks with only image-level annotations, it effectively solves the problems of candidate region redundancy in commonly used weakly supervised target detection algorithms and inaccurate image-level labels in application scenarios. First, based on the statistical characteristics of SAR images, constant false alarm rate (CFAR) detection is used to obtain candidate boxes. Only one candidate box is obtained for each ship target, and false alarm candidate boxes are also obtained. To distinguish whether ship-type instance packets have backgrounds, a scene classification network is used to obtain a class activation map for ship-type images. The image-level labels of ship-type images are updated by checking whether the CFAR results are consistent with the class activation map results. Finally, based on the candidate boxes obtained from CFAR and the updated image-level labels, a weakly supervised target detection network is trained to classify the CFAR candidate boxes and remove false alarms.
[0114] This invention employs constant virtual detection (CVD) to obtain candidate regions in weakly supervised target detection. CVD performs pixel-by-pixel detection based on the statistical characteristics of SAR images to obtain a binary segmentation map, using the bounding boxes of connected regions as candidate regions. Compared to selective search for candidate regions, CVD typically generates only one candidate region for each target, and this candidate region encompasses the entire target. This effectively avoids the subsequent classification of candidate regions that only contain a portion of the target as the target itself; that is, the detection result only focuses on a portion of the target area.
[0115] Furthermore, this invention obtains a class activation map through a scene classification network. Utilizing the consistency between the class activation map and the constant virtual detection, images containing boats are further divided into two categories: images containing only targets in the instance package and images containing both background and targets in the instance package. Through this division, a weakly supervised object detection network based on deep learning can further learn the differences between the target and the background, thereby removing the background from the candidate regions.
[0116] The present invention also discloses a weakly supervised SAR image target detection device based on constant virtual detection and CAM, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the above-described method.
[0117] The present invention also discloses an embodiment that provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-described method embodiments.
[0118] The present invention also provides a computer program product that, when run on a data storage device, enables the data storage device to implement the steps in the above-described method embodiments.
[0119] If the integrated unit module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a storage device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0120] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0121] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0122] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0123] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
Claims
1. A weakly supervised SAR image target detection method based on constant virtual detection and CAM, characterized in that, The target detection is implemented using a weakly supervised target detection network, which includes a feature extraction network. Includes the following steps: A feature extraction network is used to extract depth features from the SAR image to be detected, and a virtual constant detector is used to generate candidate regions in the SAR image to be detected. Extract the local depth features corresponding to the candidate region from the depth features; The classification detection results and classification contribution of the local depth features are generated respectively; By fusing the classification detection results and classification contribution, the image-level label of the SAR image to be detected is obtained; During the training of the weakly supervised target detection network, the image-level labels of SAR images are determined jointly by the virtual constant detector and the scene classification network. Determining the image-level label of the SAR image includes: Obtain the class activation map output by the scene classification network; The first region label output by the constant virtual detector is corrected according to the class activation mapping to obtain the second region label; The second region label is fused to obtain the image-level label of the SAR image.
2. The weakly supervised SAR image target detection method based on constant virtual detection and CAM as described in claim 1, characterized in that, The first region label output by the constant virtual detector is corrected according to the class activation map, including: The score of the candidate region output by the constant virtual detector is calculated based on the class activation map; wherein the score is calculated as follows: , In the formula, For fractions, For hyperparameters, The average pixel value of the candidate region in the corresponding region of the class activation map.
3. The weakly supervised SAR image target detection method based on constant virtual detection and CAM as described in claim 1, characterized in that, The fusion of the classification detection results and classification contribution includes: Perform a SoftMax operation on the classification detection results to obtain the operation result. ; Perform a SoftMax operation on the classification contribution to obtain the operation result. ; right and Perform the Hadmard product operation to obtain the score of the candidate region.
4. The weakly supervised SAR image target detection method based on constant virtual detection and CAM as described in claim 3, characterized in that, The operation result The calculation method is as follows: , in, for The element in the i-th column and j-th row, For classification test results The Middle Liede The elements of a row.
5. The weakly supervised SAR image target detection method based on constant virtual detection and CAM as described in claim 3, characterized in that, The operation result The calculation method is as follows: , in, for The element in the i-th column and j-th row, Contribution to classification The Middle Liede The elements of a row.
6. The weakly supervised SAR image target detection method based on constant virtual detection and CAM as described in claim 4 or 5, characterized in that, The loss function of the weakly supervised target detection network is: , in, Represents the loss function. Represents the m-th training image belonging to the th training image. The probability of a class This indicates that the weakly supervised object detection network belongs to the m-th training image. Predicted probability of class This indicates the number of training images.
7. The weakly supervised SAR image target detection method based on constant virtual detection and CAM as described in claim 1, characterized in that, The loss function of the scene classification network is: , in, This represents the loss function of the scene classification network. Represents the true labels of the training images. This represents the predicted label of the scene classification network for the training image.
8. A weakly supervised SAR image target detection device based on constant virtual detection and CAM, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-7.