Small sample target detection method and device

Through self-supervised learning and spatial attention mechanism, the detection accuracy and model stability of the small sample object detection method are improved, and the problems of model complexity and overfitting in the existing technology are solved.

CN114399644BActive Publication Date: 2025-02-07BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111535847.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2025-02-07
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

The existing small sample object detection method increases the spatial complexity of the model during training, which easily leads to overfitting, and is prone to incorrect classification in the object classification module, resulting in low detection accuracy.

Method used

A small sample object detection method is proposed, which replaces large data set training through self-supervised learning, designs a robust visual representation backbone network to build a powerful visual representation, and introduces a spatial attention mechanism between and within samples to improve the model in small sample data. Performance ability in sets.

Benefits of technology

Through self-supervised pre-training and spatial attention mechanism, the model's detection accuracy of small sample data is improved, the risk of overfitting is reduced, and better parameter initialization direction and feature mining capabilities are provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399644B_ABST
    Figure CN114399644B_ABST
Patent Text Reader

Abstract

The present invention proposes a small sample target detection method, including: sending the weight of the backbone network and the weight of the feature pyramid to the detection network; generating candidate regions, the candidate regions come from the foreground and background classification and regression results of the output features of the visual representation backbone network by the region proposal network; generating candidate region features of uniform size by means of a pooling operator according to the candidate regions, and performing position regression, content classification and fine-grained feature mining of the candidate region features of uniform size; using fine-grained feature mining, constructing fine-grained positive sample pairs and negative sample pairs, and forming a comparative learning between the fine-grained features of the candidate regions; forming a loss function according to the strategy in the fine-grained feature mining, and updating the detection network parameters by calculating the loss function. The method provides a visual representation backbone network for small sample target detection, and improves the fine-grained features of the sample and the model detection accuracy by mining the sample features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning, and in particular to a small sample target detection method. Background Art

[0002] In recent years, the development of deep convolutional neural networks has greatly promoted the progress of related algorithms in the field of computer vision. As one of the research branches in the field of computer vision, object detection mainly classifies and locates objects in images. General object detection is mainly divided into two mainstream branches: two-stage detection network and single-stage detection network. Both need to be pre-trained on a large number of annotated data sets, which leads to a single coverage scenario. When migrating to scenarios with scarce annotated data, it is easy to cause a decrease in detection accuracy.

[0003] Among the related technologies, few-shot learning has gradually attracted the attention of academia and industry. Few-shot learning aims to mine the potential features of samples through a small amount of labeled data, and then fit a robust feature space through a small amount of data to complete related visual perception tasks. Few-shot object detection, as one of the important branches in the field of few-shot learning, aims to complete the classification and positioning of corresponding objects through a small amount of new class labeled data. At present, there are mainly two solutions for few-shot object detection:

[0004] Small sample target detection based on meta-learning. It aims to let the model learn "how to learn" and can be divided into optimization-based methods and metric learning-based methods. Among them, the optimization-based method aims to construct an effective parameter update law or a good parameter initialization law; the metric learning-based method focuses on how to build a robust feature embedding space and form representations of different categories in the embedding space through similarity calculation.

[0005] Small sample object detection based on transfer learning. This method first conducts sufficient training on a base class with rich samples, and then fine-tunes the model using a small amount of data from the new class to achieve good generalization performance on the new class while minimizing the loss of base class knowledge.

[0006] However, meta-learning introduces additional model parameters during training, which increases the spatial complexity of the model and easily leads to overfitting problems, making it impossible to produce a good network initialization rule. Also, transfer learning transfers the knowledge learned from the base class to the new class through fine-tuning. Due to the small amount of data in the new class, the model does not pay enough attention to spatial information, and it is easy to produce misclassification in the object classification module, resulting in low detection accuracy. Therefore, there is an urgent need for "a small sample target detection method with higher generalization performance." Summary of the invention

[0007] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

[0008] To this end, the first purpose of the present invention is to propose a small sample target detection method to implement the use of self-supervised learning proposed in this scheme instead of large data sets. By designing self-supervised tasks, a robust visual representation backbone network is constructed to provide a good parameter initialization direction for small sample target detection; secondly, a spatial attention mechanism between and within samples is proposed to explore the essential characteristics of the data and improve the performance of the model on small sample data sets.

[0009] The second objective of the present invention is to provide a small sample target detection device.

[0010] A third object of the present invention is to provide a non-transitory computer-readable storage medium.

[0011] A fourth object of the present invention is to provide a computer program product.

[0012] To achieve the above object, a first embodiment of the present invention provides a method, comprising:

[0013] Sending the weight of the backbone network and the weight of the feature pyramid to the detection network, wherein the weight of the backbone network and the weight of the feature pyramid are derived from the visual representation backbone network generated by self-supervised training;

[0014] Generate candidate regions, where the candidate regions come from foreground and background classification and regression results of the region proposal network on the output features of the visual representation backbone network;

[0015] Generate candidate region features of uniform size by using a pooling operator according to the candidate region, and perform position regression, content classification, and fine-grained feature mining on the candidate region features of uniform size;

[0016] By using the fine-grained feature mining, fine-grained positive sample pairs and negative sample pairs are constructed to form a comparative learning of fine-grained features of candidate regions. The fine-grained feature mining includes: using an average division method to divide the candidate region features of the uniform size into regions, extracting features of different regions after division, and assigning the same label to the division results from the same candidate region and assigning different labels to the division results from different candidate regions;

[0017] A loss function is formed according to the strategy in the fine-grained feature mining, and the detection network parameters are updated by calculating the loss function.

[0018] The method of the embodiment of the present invention solves the technical problems in the prior art.

[0019] Optionally, in one embodiment of the present application, the visual representation backbone network generated by the self-supervised training includes:

[0020] Acquire unlabeled original image data, where the original image data is derived from an output result of an image acquisition device;

[0021] Performing different data enhancements on the original image data respectively to obtain corresponding image data of multiple views;

[0022] The image data of each view in the image data of the multiple views is respectively input into multiple backbone networks for comparative learning between features of different granularities, and a visual representation backbone network is generated based on the comparative learning between global features and local features. Optionally, in one embodiment of the present application, the image data of each view in the image data of the multiple views is respectively input into multiple backbone networks for comparative learning between features of different granularities, and a visual representation backbone network is generated based on the comparative learning between global features and local features, including:

[0023] Constructing unsupervised data pseudo labels, subjecting the unlabeled original image data to different data enhancements to generate corresponding views, respectively inputting the views from the multiple backbone networks, extracting features from the views of the same unlabeled original image data through the multiple backbone networks and assigning the same pseudo labels, and extracting features from the views of different unlabeled data through the multiple backbone networks and assigning different pseudo labels;

[0024] Pre-training fine-grained features, the pre-training fine-grained features include: the unsupervised data pseudo-labels present different feature granularities at different levels of the feature pyramid, and forming a unified output through pooling;

[0025] Generate a visual representation backbone network, the generating of the visual representation backbone network includes: combining contrast learning of global features and local features, using the loss function of the contrast learning to update model parameters, and finally generating a backbone network with the ability to represent objects of different scales.

[0026] Optionally, in one embodiment of the present application, the multiple backbone networks include:

[0027] A first backbone network, wherein the first backbone network is used for back propagation to perform parameter update;

[0028] The second backbone network is used to remove the gradients of all parameters and perform parameter updates through momentum updates.

[0029] Optionally, in one embodiment of the present application, the loss function includes:

[0030] The loss function uses InfoNCE, and the overall loss comes from global feature learning and local feature learning. The specific formula is as follows:

[0031]

[0032] Among them, q g represents the first global feature learning result, k g+ represents the second global feature learning result, k gi Represents the third global feature learning result, q l , k l+ and k li Respectively represent the corresponding local feature learning results, and L total Represents the overall loss, L global represents the loss of global feature learning, L local represents the loss of local learning;

[0033] The entire small sample target detection method contains three loss functions, namely, the category loss function L cls , prediction box regression loss function L bbox , and sample feature mining loss function L feat , the overall loss is a mixture of the three loss functions in the same proportion, and the formula is as follows:

[0034]

[0035] Optionally, in one embodiment of the present application, generating a candidate region further includes:

[0036] The feature pyramid network is embedded in the backbone network as a component of the detection network to extract image features of different granularities to generate candidate regions.

[0037] To achieve the above-mentioned purpose, a second embodiment of the present invention provides a small sample target detection device, comprising:

[0038] A sending module, used for sending the weight of the backbone network and the weight of the feature pyramid to the basic detection network, wherein the weight of the backbone network and the weight of the feature pyramid are derived from the visual representation backbone network;

[0039] In the first generation module, the candidate regions are obtained from the foreground and background classification and regression results of the region proposal network on the output features of the visual representation backbone network;

[0040] A second generation module is used to generate candidate region features of uniform size based on the candidate regions by means of a pooling operator, and perform position regression, content classification, and fine-grained feature mining on the candidate region features of uniform size;

[0041] A learning module is used to utilize the fine-grained feature mining to construct fine-grained positive sample pairs and negative sample pairs to form a comparative learning of fine-grained features of candidate regions, wherein the fine-grained feature mining includes: using an average division method to divide the candidate region features of the uniform size into regions, extracting features of different regions after division, and assigning the same label according to the division results from the same candidate region and assigning different labels to the division results from different candidate regions;

[0042] An updating module is used to form a loss function according to the strategy in the fine-grained feature mining, and to update the detection network parameters by calculating the loss function.

[0043] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the small sample target detection method described in the first aspect embodiment of the present application is implemented.

[0044] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a small sample target detection method described in the first aspect embodiment of the present application is implemented.

[0045] In summary, the present invention proposes a small sample target detection method / device / computer device and a non-temporary computer-readable storage medium. The present invention proposes to add a sample feature mining learning module to provide richer features for small sample learning, and to improve the fine-grained feature attention to samples within the class and the representation ability of the category in the feature space, as well as the model detection accuracy through intra-sample feature mining and inter-sample feature mining. Additional aspects and advantages of the present invention will be partially given in the following description, and some will become obvious from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0047] Figure 1 A schematic diagram of a flow chart of a small sample target detection method provided by an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of the overall process of self-supervised training provided by an embodiment of the present invention;

[0049] Figure 3 A schematic diagram of the overall process of small sample target detection provided by an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of a method for learning intra-sample feature mining provided by an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of the structure of a small sample target detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0053] The following describes a small sample target detection method and device according to an embodiment of the present invention with reference to the accompanying drawings.

[0054] Figure 1 A schematic diagram of a flow chart of a small sample target detection method provided in an embodiment of the present invention.

[0055] like Figure 1 As shown, the small sample target detection method includes the following steps:

[0056] Step S1: sending the weights of the backbone network and the weights of the feature pyramid to the detection network, wherein the weights of the backbone network and the weights of the feature pyramid are derived from the visual representation backbone network generated by self-supervised training.

[0057] It should be noted that, in one embodiment of the present invention, the ResNet series backbone network used in self-supervised training can completely migrate its weights to the basic detection network, such as Faster R-CNN, Cascade R-CNN, etc.

[0058] In one embodiment of the present invention, the visual representation backbone network generated by self-supervised training includes:

[0059] Obtaining unlabeled original image data, where the original image data comes from the output result of the image acquisition device;

[0060] Perform different data enhancements on the original image data respectively to obtain corresponding image data of multiple views;

[0061] The image data of each view in the image data of multiple views are respectively input into multiple backbone networks for comparative learning between features of different granularities, and a visual representation backbone network is generated based on the comparative learning between global features and local features.

[0062] And, in one embodiment of the present invention, the image data of each view in the image data of the multiple views is respectively input into the multiple backbone networks for comparative learning between features of different granularities, and a visual representation backbone network is generated according to the comparative learning between the global features and the local features, including:

[0063] Construct unsupervised data pseudo labels, generate corresponding views from the unlabeled original image data through different data enhancements, and input them into multiple backbone networks respectively. Views from the same unlabeled original image data undergo feature extraction from multiple backbone networks and are assigned the same pseudo labels, while views from different unlabeled data undergo feature extraction from multiple backbone networks and are assigned different pseudo labels.

[0064] Pre-training fine-grained features, including: unsupervised data pseudo-labels present different feature granularities at different levels of the feature pyramid, and forming a unified output through pooling;

[0065] Generate a visual representation backbone network, including: combining contrastive learning of global features and local features, using the loss function of contrastive learning to update model parameters, and finally generate a backbone network with the ability to represent objects of different scales.

[0066] Among them, in one embodiment of the present invention, the loss function adopts InfoNCE, and the overall loss comes from global feature learning and local feature learning. The specific formula is as follows:

[0067]

[0068] q g is the first global feature learning result, k g+ is the second global feature learning result, k gi is the third global feature learning result, q l , k l+ and k li are the corresponding local feature learning results, and L total is the total loss, L global is the loss of global feature learning, L local is the loss for local learning.

[0069] Further, in one embodiment of the present invention, the first global feature learning result is Figure 2 The global feature learning result in the middle is Figure 3 The global feature encoding results in the middle and the third global feature learning results are generated for different images. Figure 3 The global feature encoding result in .

[0070] Furthermore, in one embodiment of the present invention, the plurality of backbone networks may include:

[0071] A first backbone network, the first backbone network is used for back propagation to update parameters;

[0072] The second backbone network is used to remove the gradients of all parameters and perform parameter updates through momentum updates.

[0073] It should be noted that, in one embodiment of the present invention, the multiple backbone networks usually adopt ResNet, and the comparative learning of the joint global features and local features adopts the same method as MoCo v2 to perform picture-level comparative learning.

[0074] also, Figure 3 This is a schematic diagram of the overall process of small sample target detection provided by the present invention. This figure follows the small sample detection framework based on transfer learning, where the base class represents a category with sufficient labeled data, and the new class represents a detection scenario with only a small number of labeled samples. After the model is trained on the base class data, transfer learning is used to guide the transfer of knowledge from the base class to the new class, and then better model performance is achieved under the condition of few samples.

[0075] Step S2: Generate candidate regions, which come from the foreground and background classification and regression results of the region proposal network on the output features of the visual representation backbone network.

[0076] In one embodiment of the present invention, generating a candidate region further includes:

[0077] The feature pyramid network is embedded in the backbone network as a component of the detection network to extract image features of different granularities to generate candidate regions.

[0078] And, in one embodiment of the present invention, candidate regions with sizes ranging from 32x32 to 512x512 are extracted and generated respectively, so as to perform position regression on objects of different sizes.

[0079] Step S3: Based on the candidate regions, a pooling operator is used to generate candidate region features of uniform size, and position regression, content classification, and fine-grained feature mining are performed on the candidate region features of uniform size.

[0080] In one embodiment of the present invention, the pooling operator may include:

[0081] ROI Pooling;

[0082] ROI Align.

[0083] Step S4: Utilize fine-grained feature mining to construct fine-grained positive sample pairs and negative sample pairs, and form comparative learning between fine-grained features of candidate regions. Fine-grained feature mining includes: using an averaging method to divide candidate region features of uniform size into regions, extracting features of different regions after division, and assigning the same label based on the division results from the same candidate region, and assigning different labels based on the division results from different candidate regions.

[0084] In one embodiment of the present disclosure, by extracting features from different regions, a fine-grained feature representation of the local instance is formed, and the final dimension of the feature is 128.

[0085] like Figure 4 As shown, the present invention provides an intra-sample feature mining learning head and an inter-sample feature mining learning head. The intra-sample feature mining learning head performs window sliding on the input sample features to generate refined features at different positions of each candidate frame, and uses pseudo-label allocation and comparative learning to mine finer sample features, providing finer information for the classification of candidate frames.

[0086] Step S5: A loss function is formed according to the strategy in fine-grained feature mining, and the detection network parameters are updated by calculating the loss function.

[0087] In one embodiment of the present disclosure, the loss function may include:

[0088] The entire small sample target detection method contains three loss functions, namely, the category loss function L cls , prediction box regression loss function L bbox , and sample feature mining loss function L feat , the overall loss is a mixture of the three loss functions in the same proportion, and the formula is as follows:

[0089]

[0090] To summarize, the present invention proposes a small sample target detection method, in which the present invention proposes to use self-supervised pre-training instead of supervised training. The pre-training focuses on the features within the instance, which can mine the fine-grained features within the sample and effectively retain the spatial information; the pre-training focuses on the spatial features between instances, which can widen the distance between data of different categories and improve the accuracy of the representation of category information in the feature space.

[0091] Figure 5 A schematic diagram of the structure of a small sample target detection provided by an embodiment of the present invention.

[0092] like Figure 5 As shown, the small sample target detection device includes the following modules:

[0093] A sending module is used to send the weights of the backbone network and the weights of the feature pyramid to the basic detection network. The weights of the backbone network and the weights of the feature pyramid are derived from the visual representation backbone network.

[0094] The first generation module is used for the classification and regression results of the foreground and background of the candidate regions from the region proposal network to the output features of the visual representation backbone network;

[0095] The second generation module is used to generate candidate region features of uniform size based on the candidate regions by means of a pooling operator, and perform position regression, content classification, and fine-grained feature mining on the candidate region features of uniform size;

[0096] The learning module is used to use fine-grained feature mining to construct fine-grained positive sample pairs and negative sample pairs to form comparative learning between fine-grained features of candidate regions. Fine-grained feature mining includes: using an average division method to divide the candidate region features of uniform size into regions, extracting features of different regions after division, and assigning the same label to the division results from the same candidate region and different labels to the division results from different candidate regions;

[0097] The update module is used to form a loss function according to the strategy in fine-grained feature mining, and update the detection network parameters by calculating the loss function.

[0098] To summarize, the present invention proposes a small sample target detection device, in which the present invention proposes to use self-supervised pre-training instead of supervised pre-training, designs a learning task that combines global and local features, and adds a sample feature mining learning module, aiming to provide richer features for small sample learning, and improve the attention to fine-grained features of samples within the class and the representation ability of categories in the feature space, as well as the model detection accuracy, by mining features within the sample and between samples.

[0099] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes a computer device, which has a memory, a processor and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, a method for small sample target detection described in the first aspect embodiment of the present application is implemented.

[0100] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for small sample target detection described in the first aspect embodiment of the present application is implemented.

[0101] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0102] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0103] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0104] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0105] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0106] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0107] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0108] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A small sample target detection method, characterized in that: The following steps are involved: Sending the weights of the backbone network and the weights of the feature pyramid to the detection network, wherein the weights of the backbone network and the weights of the feature pyramid are derived from the visual representation backbone network generated by self-supervised training; Generate candidate regions, where the candidate regions come from foreground and background classification and regression results of the region proposal network on the output features of the visual representation backbone network; Generate candidate region features of uniform size using a pooling operator according to the candidate regions, and perform position regression, content classification, and fine-grained feature mining on the candidate region features of uniform size; By using the fine-grained feature mining, fine-grained positive sample pairs and negative sample pairs are constructed to form a comparative learning of fine-grained features of candidate regions. The fine-grained feature mining includes: using an average division method to divide the candidate region features of the uniform size into regions, extracting features of different regions after division, and assigning the same label to the division results from the same candidate region and assigning different labels to the division results from different candidate regions; A loss function is formed according to the strategy in the fine-grained feature mining, and the detection network parameters are updated by calculating the loss function; The visual representation backbone network generated by the self-supervised training includes: Acquire unlabeled original image data, where the original image data is derived from an output result of an image acquisition device; Performing different data enhancements on the original image data respectively to obtain corresponding image data of multiple views; Inputting the image data of each view in the image data of the multiple views into multiple backbone networks respectively to perform comparative learning between features of different granularities, and generating a visual representation backbone network according to comparative learning between global features and local features; Inputting the image data of each view in the image data of the multiple views into multiple backbone networks respectively to perform comparative learning between features of different granularities, and generating a visual representation backbone network according to comparative learning between global features and local features, including: Constructing unsupervised data pseudo labels, subjecting the unlabeled original image data to different data enhancements to generate corresponding views, respectively inputting the views from the same unlabeled original image data to feature extraction by the multiple backbone networks and assigning the same pseudo labels, and subjecting the views from different unlabeled original image data to feature extraction by the multiple backbone networks and assigning different pseudo labels; Pre-training fine-grained features, the pre-training fine-grained features include: the unsupervised data pseudo-labels present different feature granularities at different levels of the feature pyramid, and forming a unified output through pooling; Generate a visual representation backbone network, the generating of the visual representation backbone network includes: combining contrast learning of global features and local features, using the loss function of the contrast learning to update model parameters, and finally generating a backbone network with the ability to represent objects of different scales.

2. The method according to claim 1, characterized in that The plurality of backbone networks include: A first backbone network, wherein the first backbone network is used for back propagation to perform parameter update; The second backbone network is used to remove the gradients of all parameters and perform parameter updates through momentum updates.

3. The method according to claim 1, characterized in that The loss function includes: The loss function uses InfoNCE, and the overall loss comes from global feature learning and local feature learning. The specific formula is as follows: in, Represents the first global feature learning result, Represents the second global feature learning result, Represents the third global feature learning result, , and Represent the corresponding local feature learning results, and represents the overall loss, represents the loss of global feature learning, represents the loss of local learning; The entire small sample target detection method contains three loss functions, namely, category loss function , prediction box regression loss function , and sample feature mining loss function , the overall loss is a mixture of the three loss functions in the same proportion, and the formula is as follows: 。 4. The method according to claim 1, characterized in that The generating of the candidate region further includes: The feature pyramid is embedded in the backbone network as a component of the detection network to extract image features of different granularities to generate candidate regions.

5. A small sample target detection device, characterized in that: The device implements the small sample target detection method according to claim 1, and the device comprises: A sending module, used for sending the weight of the backbone network and the weight of the feature pyramid to the detection network, wherein the weight of the backbone network and the weight of the feature pyramid are derived from the visual representation backbone network; A first generation module is used to generate candidate regions, where the candidate regions come from the foreground and background classification and regression results of the region proposal network on the output features of the visual representation backbone network; A second generation module is used to generate candidate region features of uniform size based on the candidate regions by means of a pooling operator, and perform position regression, content classification, and fine-grained feature mining on the candidate region features of uniform size; A learning module is used to utilize the fine-grained feature mining to construct fine-grained positive sample pairs and negative sample pairs to form a comparative learning of fine-grained features of candidate regions, wherein the fine-grained feature mining includes: using an average division method to divide the candidate region features of the uniform size into regions, extracting features of different regions after division, and assigning the same label according to the division results from the same candidate region and assigning different labels to the division results from different candidate regions; An updating module is used to form a loss function according to the strategy in the fine-grained feature mining, and to update the detection network parameters by calculating the loss function.

6. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • A small sample target recognition method based on depth transfer metric learning

    CN109376578A

  • Marine target detection method and system based on self-supervised representation learning

    CN112464879A