Weakly supervised target detection method and system for remote sensing images based on self-attention mechanism

By introducing a self-attention mechanism module into the weakly supervised object detection algorithm, the relationship and position size information between candidate boxes are used to solve the problems of missed and false alarms in remote sensing image processing, and the accuracy and automation of detection results are improved level, achieving more efficient remote sensing image analysis.

CN114821331BActive Publication Date: 2024-11-05BEIHANG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210524417.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2024-11-05
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

The existing weakly supervised object detection algorithm fails to effectively utilize the relationship between candidate boxes and the position size information of candidate boxes, resulting in a low level of automation of remote sensing image processing, missing and false alarms, and it is difficult to meet the high requirements of real-time information acquisition. .

Method used

Using a remote sensing image weakly supervised object detection method based on the self-attention mechanism, the relationship between candidate boxes is modeled through the self-attention mechanism module, and the position and size information of the candidate boxes are used as part of the feature to match the original feature. Splicing, building identification models to improve detection results.

Benefits of technology

Through the use of the self-attention mechanism module, global information is provided to improve the selection of candidate box pseudo-labels, improve the accuracy and reliability of detection results, improve the automation processing capabilities of remote sensing images, and reduce missed and false alarms. Improves the training effect of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114821331B_ABST
    Figure CN114821331B_ABST
Patent Text Reader

Abstract

The present invention discloses a remote sensing image weakly supervised target detection method and system based on a self-attention mechanism, the method comprising: obtaining a training image and a candidate frame with it, and image-level annotation information corresponding to the training image; inputting the training image, the candidate frame and the annotation information into a recognition model for training; the recognition model comprises: a candidate frame cluster learning module and a self-attention mechanism module; the self-attention mechanism module comprises: an encoder module and a decoder module; the image of the target to be identified and the candidate frame with it are input into the trained recognition model, and the recognition result is outputted in turn through the candidate frame cluster learning module, the encoder module and the decoder module; the recognition result comprises: the corresponding target position, size and category in the image. The recognition model of the method models the relationship between the candidate frames through the self-attention mechanism, can obtain richer information, and thus obtain better detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital image processing, in particular to the field of deep learning and weakly supervised target detection technology, and specifically to a remote sensing image weakly supervised target detection method and system based on a self-attention mechanism. Background Art

[0002] Object detection technology is a technology that finds objects of interest in an image based on image features and determines their location and category. With the rise of deep learning, object detection algorithms based on convolutional neural networks have developed rapidly, and algorithms with phenotypes such as Faster-RCNN, YOLOv3, and SSD have emerged. Weakly supervised object detection technology uses image-level annotations (i.e., the true value label only gives the categories of objects in the image to be detected, but does not give the specific location information of the object) to train the algorithm model, and can still give the location and category of the object of interest during the test phase.

[0003] Nowadays, remote sensing data is growing explosively, but the processing and utilization capabilities of remote sensing images have not kept pace with the growth of remote sensing data. The level of automated processing of remote sensing image analysis is relatively low, and the target information obtained has omissions and false alarms, making it difficult to meet the increasingly high practical requirements. It is difficult to quickly and accurately discover valuable information from a large number of visible light remote sensing images of ocean backgrounds by relying solely on expert interpretation, and it is even more difficult to generate intelligence in real time. In addition, the amount of image data is large, and the distortion-free transmission process is time-consuming and has poor reliability. In order to solve the problem of difficulty in obtaining object-level labels, target detection algorithms based on weakly supervised learning have emerged.

[0004] On the one hand, when performing manual annotation, image-level annotation (such as Figure 1 The difficulty of object-level annotation (such as Figure 1 On the other hand, due to the existence of search engines, people can even easily obtain samples with specific image-level annotations through the Internet, further reducing the workload of building datasets. Therefore, in practical applications, target detection methods based on weakly supervised learning are more promising.

[0005] The existing mainstream weakly supervised object detection technology is to extract a large number of candidate boxes from the image in advance through a certain candidate box extraction algorithm, and extract a feature for each candidate box. Then, the multi-instance learning technology is used to score the category and target possibility of each feature contained in the candidate box. The candidate box with a high score is the output result of the weakly supervised detection.

[0006] However, existing algorithms process all candidate box features separately, without considering the relationship between candidate box features (for example, if two candidate boxes are parts of the same object, then the two candidate boxes have similar features), and do not utilize the information between candidate boxes. In addition, for an image, the position and size information of the candidate box is also a basis for judging whether it is an object, but existing weakly supervised algorithms do not take into account the additional prior information brought by this aspect. Summary of the invention

[0007] The main purpose of the present invention is to propose a remote sensing image weakly supervised target detection method and system based on the self-attention mechanism, which models the relationship between candidate boxes through the self-attention mechanism, thereby providing global information for the selection of candidate box pseudo labels, thereby solving the problem of small prediction box dominance caused by weakly supervised target detection algorithms processing remote sensing images. This method uses the position and size information of the candidate box as part of the feature and splices it with the original feature, so as to obtain richer information and thus obtain better detection results.

[0008] To achieve the above object, the technical solution adopted by the present invention is:

[0009] The embodiment of the present invention provides a remote sensing image weakly supervised target detection method based on a self-attention mechanism, including:

[0010] S10, obtaining a training image and a candidate box with the training image, as well as image-level annotation information corresponding to the training image;

[0011] S20, inputting the training image, candidate boxes and annotation information into a recognition model for training; the recognition model includes: a candidate box cluster learning module and a self-attention mechanism module; the self-attention mechanism module includes: an encoder module and a decoder module;

[0012] S30, input the image of the target to be identified and the candidate box with it into the trained recognition model, and output the recognition result through the candidate box cluster learning module, encoder module and decoder module in sequence; the recognition result includes: the corresponding target position, size and category in the image.

[0013] Furthermore, in the step S30, the encoding process of the encoder module is as follows:

[0014] Extract high-dimensional features F∈R from the target candidate box output by the candidate box cluster learning module d×1 and the corresponding position and size encoding P∈R d×1 ;

[0015] Generate a feature map M∈R according to the dimension d of the high-dimensional feature and the number m of target candidate boxes d×m ;

[0016] The feature map M is mapped to Q, K, V through different linear mapping layers to obtain a new self-attention feature map:

[0017]

[0018] New self-attention feature map M new After three self-attention mechanism layers, the encoded candidate box feature map M is obtained * ∈R d×m .

[0019] Furthermore, in the step S30, the decoding process of the decoder module is as follows:

[0020] The input of the decoder module is a set of learned query vectors q∈R d×1 The feature map H∈R d×n , and the encoded candidate box feature map M obtained by the encoder module * , where n is the number of query vectors;

[0021] The input of the decoder module is mapped to Q', K', V' through different linear mapping layers to obtain the update of the H matrix:

[0022]

[0023] Updated H new After three self-attention mechanism layers, the decoded query vector feature map H is obtained * ∈R d×n .

[0024] Furthermore, in the step S30, outputting the recognition result includes:

[0025] Using the decoded query vector set H * Predict the location, size and category of the target in the image and output the prediction results.

[0026] Further, using the decoded query vector set H * Predict the location, size and category of the target in the image and output the prediction results; including:

[0027] H * Through a linear layer to get the category result cls∈R of the query vector n×1 , in the category results, the 0th category is set as the background category, and categories 1 to k are the target categories of interest;

[0028] H * Through a multi-layer perceptron to get the position size result of the query vector obj∈R n×4, where the position size result obj of the i-th query vector i =[cx i ,cy i ,w i ,h i ]∈R 1×4 They are the center point coordinates and length and width of the prediction box on the x and y axes respectively.

[0029] Furthermore, in the step S20, the loss function used by the self-attention mechanism module is:

[0030] L trans =λ1L bbox +λ2L cls

[0031] Among them, λ1 and λ2 are coefficients respectively;

[0032] L bbox =λ L1 ||b pred -b truth ||1

[0033]

[0034] L bbox The L1 loss function used to represent the candidate box position information, b pred Indicates the size and position information of the predicted detection box, including the length, width, and the position of the center point in the image, b truth Indicates the size and position information of the detection box of the pseudo label generated by the algorithm;

[0035] L cls Represents the Focal loss function used for category information, where α and γ are weight factors that control the shape of the loss curve, c pred Represents the category score of the predicted detection box, c truth Represents the category information of the detection box of the pseudo label generated by the algorithm.

[0036] In a second aspect, an embodiment of the present invention further provides a remote sensing image weakly supervised target detection system based on a self-attention mechanism, comprising:

[0037] An acquisition module is used to acquire training images and candidate boxes therewith, as well as image-level annotation information corresponding to the training images;

[0038] A training module, used to input training images, candidate boxes and annotation information into a recognition model for training; the recognition model includes: a candidate box cluster learning module and a self-attention mechanism module; the self-attention mechanism module includes: an encoder module and a decoder module;

[0039] The detection module is used to input the image of the target to be identified and the candidate box with it into the trained recognition model, and output the recognition result through the candidate box cluster learning module, encoder module and decoder module in sequence; the recognition result includes: the corresponding target position, size and category in the image.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The weakly supervised target detection method of remote sensing images based on the self-attention mechanism provided by the embodiment of the present invention includes: obtaining a training image and a candidate frame with it, and image-level annotation information corresponding to the training image; inputting the training image, the candidate frame and the annotation information into a recognition model for training; the recognition model includes: a candidate frame cluster learning module and a self-attention mechanism module; the self-attention mechanism module includes: an encoder module and a decoder module; the image of the target to be identified and the candidate frame with it are input into the trained recognition model, and the recognition result is output in turn through the candidate frame cluster learning module, the encoder module and the decoder module; the recognition result includes: the corresponding target position, size and category in the image. The recognition model of the method models the relationship between the candidate frames through the self-attention mechanism, and splices the position and size information of the candidate frame as part of the feature with the original feature, so as to obtain richer information and thus obtain better detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 The images of the prior art include manually annotated schematic diagrams;

[0043] Figure 2 A flowchart of a remote sensing image weakly supervised target detection method based on a self-attention mechanism provided by an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of the framework of the base recognition model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.

[0046] In the description of the present invention, it should be noted that the terms "upper", "lower", "inner", "outer", "front end", "rear end", "two ends", "one end", "the other end" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0047] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0048] The embodiment of the present invention provides a remote sensing image weakly supervised target detection method based on a self-attention mechanism, such as Figure 1 As shown, including:

[0049] S10, obtaining a training image and a candidate box with the training image, as well as image-level annotation information corresponding to the training image;

[0050] S20, inputting the training image, candidate boxes and annotation information into a recognition model for training; the recognition model includes: a candidate box cluster learning module and a self-attention mechanism module; the self-attention mechanism module includes: an encoder module and a decoder module;

[0051] S30, input the image of the target to be identified and the candidate box with it into the trained recognition model, and output the recognition result through the candidate box cluster learning module, encoder module and decoder module in sequence; the recognition result includes: the corresponding target position, size and category in the image.

[0052] In this embodiment, for example, taking the identification of aircraft carrier and attack ship targets as an example, firstly, an image for target identification is obtained, input into the identification model, and then the output identification result is obtained; wherein, the identification model includes: a candidate frame cluster learning module and a self-attention mechanism module; the self-attention mechanism module includes: an encoder module and a decoder module. The identification result can be that there is no aircraft carrier and / or attack ship target to be identified in the image, or the position, size and category of the identified aircraft carrier and / or attack ship.

[0053] The recognition model in the above step S20 is based on the existing weakly supervised candidate box cluster learning algorithm (Proposal Cluster Learning for Weakly Supervised Object Detection, PCL), by constructing an additional self-attention encoder-decoder branch to model the relationship between candidate boxes, and using the size and position information of the candidate box as additional prior knowledge to improve the detection result.

[0054] The overall process is as follows Figure 3 As shown:

[0055] 1. Encoder module part:

[0056] Figure 3 In the figure, the upper part of the frame is the original PCL algorithm framework, and the lower part of the frame is the self-attention mechanism module, which belongs to the improved branch. The input of the improved branch is the high-dimensional features extracted by each candidate frame after passing through the CNN and SPP layers and then reduced by the linear layer to generate F∈R d×1 and its position and size encoding P∈R d×1 , where R represents the real space. The features of each candidate box input encoding layer are:

[0057] F * =F+P∈R d×1

[0058] Where d is the dimension of the feature after dimensionality reduction. In this embodiment, d is set to 128. Compared with 4096 before dimensionality reduction, the use of the features after dimensionality reduction for calculation greatly reduces the amount of calculation and saves calculation time. For an input image, the number of candidate boxes obtained by the candidate box extraction algorithm is m, and the feature map input to the encoder layer is M∈R d×m .

[0059] By inputting M into the encoder layer, the relationship information between the high-dimensional features F of the candidate boxes can be encoded and learned, thereby obtaining the candidate box features that contain the semantic relationship and position size information between the candidate boxes. The structure of the encoder layer is a self-attention mechanism layer, which is widely used in the field of computer vision. First, M is mapped to Q, K, V through different linear mapping layers, and then a new self-attention feature map is obtained:

[0060]

[0061] After three self-attention mechanism layers, the encoded candidate box feature map M is obtained. * ∈R d×m .

[0062] 2. Decoder module part:

[0063] Figure 3 In the decoder, the input is a query vector q∈R obtained by a set of learning d×1 (object query) is concatenated in the second dimension to form the decoding feature map H∈R d×n And the encoded candidate box feature map M obtained by the encoder * , where n is the number of query vectors. The structure of the decoder is similar to that of the encoder, but the input Q' is obtained by linear mapping H, while K' and V' are obtained by M * Obtained through linear mapping. The H decoding feature map matrix is ​​updated through the self-attention mechanism layer:

[0064]

[0065] After three self-attention mechanism layers, the decoded query vector feature map H is obtained. * ∈R d×n Each query vector q can be regarded as a dynamic anchor box, which can find the possible target location from the image based on the information given by the encoder.

[0066] 3. Prediction part:

[0067] Using the decoded query vector set H * The position, size and category of the target in the image can be predicted. * Through a linear layer to get the category result cls∈R of the query vector n×1 , in the classification results, the 0th category is set as the background category, and the 1st to kth categories are the target categories of interest. * Through a multi-layer perceptron to get the position size result of the query vector obj∈R n×4 , where the position size result obj of the i-th query vector i =[cx i ,cy i ,w i ,h i ]∈R 1×4 are the center point coordinates, length and width of the prediction box on the x and y axes respectively. At this time, by using the query vector for prediction, the multi-instance classification problem can be converted into a target set prediction problem. At this time, the prediction result will not be limited to the position given by the candidate box, but will focus on the global information of the entire image, which can enable the feature extraction network to obtain more comprehensive information, thereby improving the ability of feature extraction.

[0068] 4. Loss function:

[0069] The loss function used in the self-attention mechanism module is the difference between the predicted result set and the pseudo-label true value result generated by the PCL part. The candidate box position information uses the L1 loss function, while the category information uses the Focal loss loss function:

[0070] L bbox =λ L1 ||b pred -b truth ||1

[0071]

[0072] The loss function of this part can be obtained by organically combining the two loss functions:

[0073] L trans =λ1L bbox +λ2L cls

[0074] λ1 and λ2 are coefficients, which can be 0.4 and 1 respectively;

[0075] b pred Represents the size and position information of the predicted detection box, including the length, width, and the position of the center point in the image, b truth The size and position information of the detection box representing the pseudo-label generated by the algorithm;

[0076] L cls Represents the Focal loss function used for category information, where α and γ are weight factors that control the shape of the loss curve, c pred Represents the category score of the predicted detection box, c truth Represents the category information of the detection box of the pseudo label generated by the algorithm.

[0077] By using this loss function, the self-attention mechanism module can acquire the ability to predict the target category. The feedback from this part can be used to jointly train the feature extraction part of the entire framework with the PCL part, and then use the association information between the candidate boxes and the size and position information of the candidate boxes themselves to improve the detection performance of the algorithm, and ultimately achieve accurate recognition of the target.

[0078] For example: a weakly supervised remote sensing image target detection method based on a self-attention mechanism module is used to detect targets in remote sensing images. In the experimental part, the public Worldview remote sensing ship image dataset is used. Using this dataset, 14,252 remote sensing ship images are obtained, all of which are 1024×1024 in size, and contain 56,539 target instances in 4 categories, including aircraft carriers, amphibious assault ships, destroyers, and other ships. The evaluation indicators used in the experiment are mAP and Corloc, where mAP is tested on a test set of 1,650 images, and the higher the value, the better the detection result; CorLoc is tested on a training set of 12,602 images, and the higher the value, the better the training effect of the algorithm.

[0079] Table 1 Comparison of mAP between our method (Ours) and the benchmark method PCL

[0080] method mAP@0.1 mAP@0.3 mAP@0.5 PCL(baseline) 68.04 37.48 11.10 Ours 70.14 38.70 11.55

[0081] Table 2 CorLoc comparison between this patent method and the benchmark method PCL

[0082]

[0083] As can be seen from the table, the quantitative results of the method provided by the present invention can be seen from the results of CorLoc on the training set. The method provided by the present invention can find more accurate candidate boxes during training, thereby improving the training effect of the model. Since the model uses more accurate candidate boxes during training, the detection index mAP is better than the benchmark algorithm PCL at different IoU thresholds, which shows that the method provided by the present invention can enable the model to obtain more accurate detection boxes on the test set. The results in these two tables prove the effectiveness of the method provided by the present invention and the application value of weakly supervised target detection algorithms in the field of remote sensing.

[0084] The weakly supervised target detection method for remote sensing images based on the self-attention mechanism provided by the present invention detects the image to be identified through a recognition model. The recognition model breaks the limitation of the existing algorithm that only a single candidate frame is judged, and the relationship information between the candidate frames is extracted by the self-attention mechanism module to improve the detection result. And the size and position information of the candidate frame itself are added as additional information, thereby improving the accuracy of the selection of the candidate frame. Furthermore, by constructing a codec to use the query vector for prediction, the multi-instance classification problem is converted into a prediction problem of the target set, and the information of the entire image is used to improve the training effect of the extraction network, which is conducive to the accurate recognition of the target.

[0085] Based on the same inventive concept, an embodiment of the present invention also provides a remote sensing image weakly supervised target detection system based on a self-attention mechanism. Since the principle of solving the problem by this system is similar to that of the remote sensing image weakly supervised target detection method based on a self-attention mechanism, the implementation of this system can refer to the implementation of the aforementioned method, and the repeated parts will not be repeated.

[0086] The remote sensing image weakly supervised target detection system based on the self-attention mechanism provided by the embodiment of the present invention includes:

[0087] An acquisition module is used to acquire training images and candidate boxes therewith, as well as image-level annotation information corresponding to the training images;

[0088] A training module, used to input training images, candidate boxes and annotation information into a recognition model for training; the recognition model includes: a candidate box cluster learning module and a self-attention mechanism module; the self-attention mechanism module includes: an encoder module and a decoder module;

[0089] The detection module is used to input the image of the target to be identified and the candidate box with it into the trained recognition model, and output the recognition result through the candidate box cluster learning module, encoder module and decoder module in sequence; the recognition result includes: the corresponding target position, size and category in the image.

[0090] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A weakly supervised target detection method for remote sensing images based on self-attention mechanism, characterized in that: include: S10, obtaining a training image and a candidate box with the training image, as well as image-level annotation information corresponding to the training image; S20, inputting the training image, candidate box and annotation information into the recognition model for training; The recognition model includes: a candidate box cluster learning module and a self-attention mechanism module; the self-attention mechanism module includes: an encoder module and a decoder module; S30, inputting the image of the target to be identified and the candidate box with it into the trained recognition model, and sequentially passing through the candidate box cluster learning module, the encoder module and the decoder module, outputting the recognition result; the recognition result includes: the corresponding target position, size and category in the image; Wherein, in the step S30, the encoding process of the encoder module is as follows: Extract high-dimensional features F∈R from the target candidate box output by the candidate box cluster learning module d×1 and the corresponding position and size encoding P∈R d×1 ; R represents the real number space; Generate a feature map M∈R according to the dimension d of the high-dimensional feature and the number m of target candidate boxes d×m ; The feature map M is mapped to Q, K, V through different linear mapping layers to obtain a new self-attention feature map: New self-attention feature map M new After three self-attention mechanism layers, the encoded candidate box feature map M is obtained * ∈R d ×m ; In the step S30, the decoding process of the decoder module is as follows: The input of the decoder module is a set of learned query vectors q∈R d×1 The feature map H∈R d×n , and the encoded candidate box feature map M obtained by the encoder module * , where n is the number of query vectors; The input of the decoder module is mapped to Q', K', V' through different linear mapping layers to obtain the update of the H matrix: Updated H new After three self-attention mechanism layers, the decoded query vector feature map H is obtained * ∈R d×n .

2. The method for weakly supervised target detection in remote sensing images based on self-attention mechanism according to claim 1, characterized in that: In the step S30, the recognition result is output, including: Using the decoded query vector set H * Predict the location, size and category of the target in the image and output the prediction results.

3. The method for weakly supervised target detection in remote sensing images based on self-attention mechanism according to claim 2, characterized in that: Using the decoded query vector set H * Predict the location, size and category of the target in the image and output the prediction results; include: H * Through a linear layer to get the category result cls∈R of the query vector n×1 , in the category results, the 0th category is set as the background category, and categories 1 to k are the target categories of interest; H * Through a multi-layer perceptron to get the position size result of the query vector obj∈R n×4 , where the position size result obj of the i-th query vector i =[cx i ,cy i ,w i ,h i ]∈R 1×4 They are the center point coordinates and length and width of the predicted box on the x and y axes respectively.

4. The method for weakly supervised target detection in remote sensing images based on self-attention mechanism according to claim 3, characterized in that: In the step S20, the loss function used by the self-attention mechanism module is: L trans =λ1L bbox +λ2L cls Among them, λ1 and λ2 are coefficients respectively; L bbox =λ L1 ||b pred -b truth ||1 L bbox The L1 loss function used to represent the candidate box position information, b pred Indicates the size and position information of the predicted detection box, including the length, width, and the position of the center point in the image, b truth Indicates the size and position information of the detection box of the pseudo label generated by the algorithm; L cls Represents the Focalloss loss function used for category information, where α and γ are weight factors that control the shape of the loss curve, c pred Represents the category score of the predicted detection box, c truth Represents the category information of the detection box of the pseudo label generated by the algorithm.

5. A weakly supervised target detection system for remote sensing images based on self-attention mechanism, characterized in that: include: An acquisition module is used to acquire training images and candidate boxes therewith, as well as image-level annotation information corresponding to the training images; The training module is used to input the training images, candidate boxes and annotation information into the recognition model for training; The recognition model includes: a candidate box cluster learning module and a self-attention mechanism module; the self-attention mechanism module includes: an encoder module and a decoder module; The detection module is used to input the image of the target to be identified and the candidate box with it into the trained recognition model, and output the recognition result through the candidate box cluster learning module, the encoder module and the decoder module in sequence; the recognition result includes: the corresponding target position, size and category in the image; Among them, the encoding process of the encoder module is as follows: Extract high-dimensional features F∈R from the target candidate box output by the candidate box cluster learning module d×1 and the corresponding position and size encoding P∈R d×1 ; R represents the real number space; Generate a feature map M∈R according to the dimension d of the high-dimensional feature and the number m of target candidate boxes d×m ; The feature map M is mapped to Q, K, V through different linear mapping layers to obtain a new self-attention feature map: New self-attention feature map M new After three self-attention mechanism layers, the encoded candidate box feature map M is obtained * ∈R d ×m ; The decoding process of the decoder module is as follows: The input of the decoder module is a set of learned query vectors q∈R d×1 The feature map H∈R d×n , and the encoded candidate box feature map M obtained by the encoder module * , where n is the number of query vectors; The input of the decoder module is mapped to Q', K', V' through different linear mapping layers to obtain the update of the H matrix: Updated H new After three self-attention mechanism layers, the decoded query vector feature map H is obtained * ∈R d×n .

Citation Information

Patent Citations

  • Video object positioning method based on weak supervised learning and video spatial and temporal characteristics

    CN110765921A

  • Weak supervision target detection method based on positive and negative sample equalization

    CN113378829A

  • Universal image target detection method and device based on self-attention mechanism

    CN113902926A