Small sample target detection method based on low frequency feature and difficult sample modulation strategy
Patent Information
- Application Number
- CN202410169035.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2044-02-06
AI Technical Summary
传统的目标检测方法在这些场景中难以表现出令人满意的性能
[0051]1.能够在拥有少量样本的情况下快速收敛,获得较好的目标检测性能,通过对训练图像进行部分遮盖,防止了模型过拟合。
Smart Images

Figure CN117974981B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of pattern recognition and computer vision, specifically to a few-sample target detection method based on low-frequency features and hard-sample modulation strategies. Background Technology
[0002] Few-shot object detection is a prominent topic in computer vision, referring to the ability to accurately identify and locate objects even when the number of object examples in the dataset is very limited. Traditional object detection methods typically rely on large-scale, rich datasets for training; however, their performance often deteriorates significantly when faced with few-shot scenarios. Few-shot object detection has wide-ranging applications in real-world fields, including surveillance cameras, autonomous vehicles, medical image analysis, and industrial quality inspection. In these applications, the availability of large-scale datasets is usually limited, further exacerbating the few-shot problem. Traditional object detection methods struggle to achieve satisfactory performance in these scenarios. Summary of the Invention
[0003] The purpose of this invention is to provide a small-sample target detection method based on low-frequency features and hard-sample modulation strategy, which can achieve good target detection performance with a small number of samples.
[0004] To achieve the above objectives, the technical solution adopted by this invention is: a small-sample target detection method based on low-frequency features and a hard-sample modulation strategy, comprising the following steps:
[0005] Step S1: Obtain a small sample object detection dataset and divide it into a base class dataset and a new class dataset. Use random probability to cover some pixels in the image. Use the covered image to train the feature extraction network to improve the network's generalization performance.
[0006] Step S2: Use the trained feature extraction network as the feature extraction module and introduce a low-frequency module to extract invariant features from the image;
[0007] Step S3: For samples that are difficult to identify, design a modulation strategy to identify them, so as to avoid the model focusing too much on the difficult samples and overfitting.
[0008] Step S4: Design a loss function based on modulation strategy and train the Faster-RCNN object detection model; first, classify and regress the acquired features in the base class dataset to obtain object detection results, and then freeze the relevant modules in the new class dataset to fine-tune the model and obtain small sample object detection results.
[0009] Furthermore, step S1 specifically includes the following steps:
[0010] Step S11: Obtain publicly available small sample object detection datasets from the internet and obtain the criteria for dividing the small sample data; divide the small sample object detection datasets into base class datasets and new class datasets according to the criteria. The base class datasets contain a large number of sample data, while the new class datasets are datasets in the small sample object detection datasets that do not overlap with the categories of the base class datasets. The number of samples in each category of the new class datasets is small. The new class data is used for model fine-tuning in step S4.
[0011] Step S12: When training the object detection model using only the base class dataset, perform nonlinear mask transformation on the input image to mask 40% of the image. The masking strategy is to divide the original image into m non-overlapping black mask unit blocks, and use the Monte Carlo method to select n small units for masking to achieve masking of the set proportion of the region without changing the true value of the label.
[0012] Step S13: In order to accelerate model training on the few-shot object detection task, a pre-trained ResNet101 feature extraction network is used to initialize the network weights and parameters to speed up the model convergence.
[0013] Furthermore, step S2 specifically includes the following steps:
[0014] Step S21: The spatial feature map obtained by the feature extraction network is converted into a frequency distribution through discrete Fourier transform; when the input feature map is distributed in the frequency domain, it is passed through a Gaussian low-pass filter to filter out the high-frequency information of the output; finally, the output feature map is obtained through inverse discrete Fourier transform.
[0015] Step S22: The digital low-pass filter adopts a Gaussian low-pass filter with an m×m kernel; to reduce the computational load, the Gaussian low-pass filter is transformed from the frequency domain to the spatial domain; the functional definition of the digital spatial Gaussian low-pass filter G(·) is:
[0016]
[0017] in, x represents the input space, and y represents the possible set of labels;
[0018] Step S23: After extracting the depth features, the depth features are converted into low-frequency features to extract low-frequency information contained in the feature map; the specific process is as follows:
[0019]
[0020] F(θ f θ g )=L(g(pool(LF(f(x dft,θf),θg))),y dft )
[0021] Where, θ g These are the parameters of the linear classification layer g(·), θ f These are the parameters of the feature extraction network f(·); and is the optimized parameter of the linear classification layer g(·) and feature extraction network f(·) trained on the dataset, used for subsequent training; F(·) is the function used for parameter optimization; L(·) is the cross-entropy loss; pool(·) is the global average pooling layer; x dft It is a feature map after discrete Fourier transform, y dft It is the true value corresponding to the feature map after the Discrete Fourier Transform; LF(·) is the low-frequency module, that is, the module that performs Discrete Fourier Transform and Gaussian low-pass filter.
[0022] Furthermore, step S3 specifically includes the following steps:
[0023] Step S31: Use modulation function f add (·) Reweight each sample; the modulation function takes the classifier prediction p as input, where p∈[0,1] is the probability that the sample belongs to a certain class, and adds a weighted scalar f to each prediction output. add (p); Apply appropriate weights to each sample to better modulate hard samples; Modulate the loss based on the confidence level of the training samples; Total loss function Represented as:
[0024]
[0025] Where L(·) is the cross-entropy loss function; f add (·) is the modulation function; f add (p)≥0;
[0026] Step S32: Define ph as the probability of a difficult sample and pe as the probability of a simple sample; introduce the correlation coefficient. and sensitivity coefficient ρ, The definitions of ρ are as follows:
[0027]
[0028] p=((f′ add (ph)) / (f′ add (pe))
[0029] Among them, f' add (·) represents f add The derivative of (·); relative coefficient It measures the ratio of the weights of difficult samples to the weights of easy samples; A larger value indicates that the network is more inclined to solve difficult examples rather than easy ones; the sensitivity coefficient ρ measures the ratio of the weight change of difficult samples to the weight change of easy samples;
[0030] For small positive values Δ, the weighted variance of the more difficult sample from a hard sample with ph+Δ to another relatively hard sample with ph is formulated as follows:
[0031]
[0032] For simple samples, the variance of the weights is:
[0033]
[0034] The larger ρ is, the faster the weight of hard samples increases compared to the weight of easy samples. When ρ is large, the network will be more sensitive to hard samples. In hard samples, a slightly lower confidence level may lead to a significant amplification of their weight.
[0035] Step S33: Modulation function f add Consider three scenarios:
[0036] First, let's look at the learning progress on hard samples: Emphasis is placed on learning from hard samples; and f add (pe) compared to f add The larger the value of (ph), the greater the penalty imposed on hard samples; thus enabling the network to classify hard samples better.
[0037] Secondly, the learning performance on moderately difficult samples: ∈ represents the relative coefficient. A moderate factor for the upper limit; ∈ is greater than 1, and the value of ∈ should not be too large. If ∈ is too large, the network will only learn difficult samples and ignore simple samples, which will lead to biased learning.
[0038] Finally, let's look at the learning progress with simple samples: ρ < ξ; ξ is a sensitive factor that limits the variance of the weights; ξ is less than 1, otherwise the modulation function will introduce an overly sensitive penalty for hard samples.
[0039] Furthermore, step S4 specifically includes the following steps:
[0040] Step S41: Introduce the cross-entropy loss function L as the supervised loss to train the model; the definition of L is as follows:
[0041]
[0042] Where, x i Let y represent the i-th object in the input image. iLet M represent the truth value of the i-th object in the input image, and M represent the number of targets identified in an image.
[0043] Step S42: Assume α and β represent the adaptive slope and bias term, respectively; α and β are adjusted by a general moderation factor τ; θ is a hyperparameter of the modulation loss function, used to adjust the influence of the modulation function on the loss; define the modulation function as:
[0044] f add (p loss )=(αp+β) θ +1
[0045] Where, p loss The sample probability is calculated using the cross-entropy loss function L. When α = 0, f add (p loss When the value becomes constant, the total loss function degenerates into the cross-entropy loss function.
[0046] Step S43: Use the region proposal loss function to calculate the difference between the predicted position of the segmented object and the actual position, and obtain the loss value L. IoU The calculation formula is as follows:
[0047]
[0048] Among them, L IoU The intersection-union ratio (IUU) represents the predicted location and the actual location of the detected target, where A and B represent the predicted bounding box and the ground truth bounding box, respectively.
[0049] Step S44: Test the trained model on the validation set to obtain the final detection accuracy; based on the trained model, introduce a few-sample mechanism to freeze all model parameters before step S3, and fine-tune the model on the new class dataset to obtain an object detection model adapted to the new class dataset.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] 1. It can converge quickly with a small number of samples and achieve good target detection performance. By partially covering the training images, it prevents the model from overfitting.
[0052] 2. Low-frequency information is more feature-invariant and better suited for small-sample object detection tasks, while high-frequency information may impair the model's generalization performance and stability. To adapt to different data distributions, the feature distribution is transformed into a frequency distribution, and low-frequency features are extracted to obtain invariant features from the image, thereby improving the model's detection capability. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating the method implementation of an embodiment of the present invention. Detailed Implementation
[0054] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0055] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0056] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0057] like Figure 1 As shown, this embodiment provides a small-sample target detection method based on low-frequency features and a hard-sample modulation strategy, including the following steps:
[0058] Step S1: Obtain a small sample object detection dataset and divide it into a base class dataset and a new class dataset. Use random probability to cover some pixels in the image. Use the covered image to train the feature extraction network to improve the network's generalization performance.
[0059] In this embodiment, step S1 specifically includes the following steps:
[0060] Step S11: Obtain publicly available small sample object detection datasets from the internet and obtain the classification criteria for the small sample data; divide the small sample object detection datasets into base class datasets and new class datasets according to the classification criteria. The base class datasets contain a large number of sample data, while the new class datasets are datasets in the small sample object detection datasets that do not overlap with the categories of the base class datasets. The number of samples in each category in the new class datasets is small. The new class data is used for model fine-tuning in step S4.
[0061] Step S12: When training the object detection model using only the base class dataset, perform nonlinear mask transformation on the input image to mask 40% of the image. The masking strategy is to divide the original image into 100 non-overlapping black mask unit blocks, and use the Monte Carlo method to select n small units for masking to achieve masking of a certain proportion of the area without changing the true value of the label.
[0062] Step S13: Initialize the network weights and parameters of the images in the small sample object detection dataset using the pre-trained ResNet101 feature extraction network to accelerate the model convergence speed.
[0063] Step S13: To accelerate model training on few-shot object detection tasks, a pre-trained ResNet101 feature extraction network is used to initialize network weights and parameters, thereby speeding up model convergence. This approach leverages the general features learned by ResNet101 on large-scale image data, providing a good starting point for the object detection model. The initialization process aims to accelerate the model's convergence on few-shot tasks, enabling it to adapt to new tasks more quickly and improve generalization performance.
[0064] Pre-trained ResNet101 feature extraction networks are typically pre-trained on large-scale image datasets to learn general image features. In few-shot object detection, we use this pre-trained network as a feature extractor instead of training a new one from scratch. This helps speed up the model's convergence on few-shot tasks because the network has already learned general features. We use the weights and parameters of the pre-trained ResNet101 as initial values and then fine-tune them on a few-shot object detection dataset to adapt them to the specific task.
[0065] Step S2: Use the trained feature extraction network as the feature extraction module and introduce a low-frequency module to extract invariant features in the image.
[0066] In this embodiment, step S2 specifically includes the following steps:
[0067] Step S21: The spatial feature map obtained by the feature extraction network is converted into a frequency distribution through Discrete Fourier Transform (DFT); when the input feature map is distributed in the frequency domain, it is passed through a Gaussian low-pass filter, and the high-frequency information of the output is filtered out; finally, the output feature map is obtained through inverse Discrete Fourier Transform; when the frequency value exceeds the cutoff frequency, the high-frequency information is suppressed.
[0068] Step S22: The digital low-pass filter adopts a Gaussian low-pass filter with an m×m kernel; to reduce the computational load, the Gaussian low-pass filter is transformed from the frequency domain to the spatial domain; the functional definition of the digital spatial Gaussian low-pass filter G(·) is:
[0069]
[0070] in, x represents the input space, and y represents the possible set of labels.
[0071] Step S23: After extracting the depth features, the depth features are transformed into low-frequency features to extract the low-frequency information contained in the feature map; this design ensures that the feature map processed by the linear classification layer contains low-frequency information; the specific process is as follows:
[0072]
[0073] F(θ f θ g )=L(g(pool(LF(f(x dft ,θf),θ g ))), y dft )
[0074] Where, θ g These are the parameters of the linear classification layer g(·), θ f These are the parameters of the feature extraction network f(·); and is the optimized parameter of the linear classification layer g(·) and feature extraction network f(·) trained on the dataset, used for subsequent training; F(·) is the function used for parameter optimization; L(·) is the cross-entropy loss; pool(·) is the global average pooling layer; x dft It is a feature map after discrete Fourier transform, y dft It is the true value corresponding to the feature map after the Discrete Fourier Transform; LF(·) is the low-frequency module, that is, the module that performs Discrete Fourier Transform and Gaussian low-pass filter.
[0075] Step S3: For samples that are difficult to identify, design a modulation strategy to identify them, so as to avoid the model focusing too much on the difficult samples and overfitting.
[0076] In this embodiment, step S3 specifically includes the following steps:
[0077] Step S31: Use modulation function f add (·) Reweight each sample; the modulation function takes the classifier prediction p as input, where p∈[0,1] is the probability that the sample belongs to a certain class, and adds a weighted scalar f to each prediction output. add (p); Applying appropriate weights to each sample will better modulate hard samples; Modulating the loss based on the confidence level of the training samples; Generally, the total loss function Represented as:
[0078]
[0079] Where L(·) is the cross-entropy loss function; f add (·) is the modulation function; f add (p)≥0.
[0080] Step S32: Define ph as the probability of a difficult sample and pe as the probability of a simple sample; introduce the correlation coefficient. and sensitivity coefficient ρ, The definitions of ρ are as follows:
[0081]
[0082] p=(f′ add (ph)) / (f′ add (pe))
[0083] Among them, f' add (·) represents f add The derivative of (·); relative coefficient It measures the ratio of the weights of difficult samples to the weights of easy samples; A larger value indicates that the network is more inclined to solve difficult examples rather than easy ones; the sensitivity coefficient ρ measures the ratio of the weight change of difficult samples to the weight change of easy samples.
[0084] For a small positive value Δ, the weighted variance of the harder sample from a hard sample with ph+Δ to another harder sample with ph is formulated as follows:
[0085]
[0086] For simple samples, the variance of the weights is:
[0087]
[0088] The larger ρ is, the faster the weight of hard samples increases compared to the weight of easy samples. When ρ is large, the network will be more sensitive to hard samples. In hard samples, a slightly lower confidence level may lead to a significant amplification of their weight.
[0089] Step S33: When hard samples are given high weights, severe overfitting can occur; therefore, hard samples should not be emphasized during training, and thus should not be penalized too much in the loss function calculation; modulation function f add Consider three scenarios:
[0090] First, let's look at the learning progress on hard samples: Due to the failure in identifying hard samples, the learning of hard samples should be emphasized; with f add (pe) compared to f add The larger the value of (ph), the greater the penalty imposed on hard samples; thus enabling the network to classify hard samples better.
[0091] Secondly, the learning performance on moderately difficult samples: ∈ represents the relative coefficient. A moderate factor for the upper limit; ∈ should be greater than 1, and the value of ∈ should not be too large. If ∈ is too large, the network will only learn difficult samples and ignore simple samples, which will lead to biased learning.
[0092] Finally, let's look at the learning progress with simple samples: ρ < ξ; ξ is a sensitive factor that limits the variance of the weights; ξ is less than 1, otherwise the modulation function may introduce an overly sensitive penalty for hard samples.
[0093] Step S4: Design a loss function based on modulation strategy and train the Faster-RCNN object detection model; first, classify and regress the acquired features in the base class dataset to obtain object detection results, and then freeze the relevant modules in the new class dataset to fine-tune the model and obtain small sample object detection results.
[0094] In this embodiment, step S4 specifically includes the following steps:
[0095] Step S41: Introduce the cross-entropy loss function L as the supervised loss to train the model; the definition of L is as follows:
[0096]
[0097] Where, x i Let y represent the i-th object in the input image. i Let M represent the true value of the i-th object in the input image, and M represent the number of targets identified in an image.
[0098] Step S42: Assume α and β represent the adaptive slope and bias term, respectively; α and β are adjusted by a general moderation factor τ; θ is a hyperparameter of the modulation loss function, used to adjust the influence of the modulation function on the loss, and is usually a positive number; define the modulation function as:
[0099] f add (P loss )=(αp+β) θ +1
[0100] Where, p loss The sample probability is calculated using the cross-entropy loss function L. When α = 0, f add (p loss When the value becomes constant, the total loss function degenerates into the cross-entropy loss function.
[0101] Step S43: Use the region proposal loss function to calculate the difference between the predicted position of the segmented object and the actual position, and obtain the loss value L. IoU The calculation formula is as follows:
[0102]
[0103] Among them, L IoU This represents the intersection-union ratio (IoU) between the predicted and actual locations of the detected target, where A and B represent the predicted bounding box and the ground truth bounding box, respectively.
[0104] Step S44: Test the trained model on the validation set to obtain the final detection accuracy; based on the trained model, introduce a few-sample mechanism to freeze all model parameters before step S3, and fine-tune the model on the new class dataset to obtain an object detection model adapted to the new class dataset.
[0105] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0106] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0107] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0108] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0109] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A small-sample target detection method based on low-frequency features and a hard-sample modulation strategy, characterized in that, Includes the following steps: Step S1: Obtain a small sample object detection dataset and divide it into a base class dataset and a new class dataset. Use random probability to cover some pixels in the image. Use the covered image to train the feature extraction network to improve the network's generalization performance. Step S2: Use the trained feature extraction network as the feature extraction module and introduce a low-frequency module to extract invariant features from the image; Step S3: For samples that are difficult to identify, design a modulation strategy to identify them, so as to avoid the model focusing too much on the difficult samples and overfitting. Step S4: Design a loss function based on modulation strategy and train the Faster-RCNN object detection model; first, classify and regress the acquired features in the base class dataset to obtain object detection results, and then freeze the relevant modules in the new class dataset to fine-tune the model and obtain small sample object detection results; Step S3 specifically includes the following steps: Step S31: Use modulation function Each sample is reweighted; the modulation function will change the classifier's predictions. As input, It represents the probability that a sample belongs to a certain category, and is a weighted scalar for each prediction output. Apply appropriate weights to each sample to better modulate hard samples; modulate the loss based on the confidence level of the training samples; total loss function. Represented as: in, It is the cross-entropy loss function; It is a modulation function; ; Step S32: Definition The probability of a difficult sample is defined as follows: For the probability of simple samples, a correlation coefficient is introduced. and sensitivity coefficient , and The definition is as follows: in, Relative coefficient It measures the ratio of the weights of difficult samples to the weights of easy samples; A higher value indicates that the network is more inclined to solve difficult examples rather than simple ones; the sensitivity coefficient The ratio of the weight change of difficult samples to the weight change of easy samples; For small positive values From having Difficult samples to have Another more difficult sample, the weight variance of the more difficult sample is formulated as follows: For simple samples, the variance of the weights is: in, The larger the value, the faster the weight of difficult samples increases compared to the weight of easy samples; when... When the confidence level is large, the network will be more sensitive to hard samples, where even a slightly lower confidence level may lead to a significant amplification of the weights. Step S33: Modulation function Consider three scenarios: First, let's look at the learning progress on hard samples: Emphasis is placed on learning from difficult samples; and compared to, The larger the value, the greater the penalty imposed on hard samples; thus enabling the network to classify hard samples better. Secondly, the learning performance on moderately difficult samples: It represents the relative coefficient. A moderate factor of the upper limit; Greater than 1, and The value should not be too large. If the size is too large, the network will only learn difficult samples and ignore simple samples, which will lead to biased learning. Finally, let's look at the learning progress with simple samples: It is a sensitive factor that limits the variance of weights; It should be less than 1; otherwise, the modulation function will impose an overly sensitive penalty on hard samples. Step S4 specifically includes the following steps: Step S41: Introduce the cross-entropy loss function Used as a supervised loss to train the model; The definition is as follows: in, Represents the first in the input image One object, Represents the first in the input image The true value of an object, M represents the number of targets identified in an image; Step S42: Assume and These represent the adaptive slope and the bias term, respectively. and According to general suitability factors Make adjustments; These are hyperparameters of the modulation loss function, used to adjust the effect of the modulation function on the loss; the modulation function is defined as: in, It is the cross-entropy loss function The calculated sample probability, when At that time, When the value becomes constant, the total loss function degenerates into the cross-entropy loss function; Step S43: Use the region proposal loss function to calculate the difference between the predicted position of the segmented object and the actual position, and obtain the loss value. The calculation formula is as follows: in, The intersection-union ratio (IUU) represents the predicted location and the actual location of the detected target, where A and B represent the predicted bounding box and the ground truth bounding box, respectively. Step S44: Test the trained model on the validation set to obtain the final detection accuracy; based on the trained model, introduce a few-sample mechanism to freeze all model parameters before step S3, and fine-tune the model on the new class dataset to obtain an object detection model adapted to the new class dataset.
2. The small-sample target detection method based on low-frequency features and hard-sample modulation strategy according to claim 1, characterized in that, Step S1 specifically includes the following steps: Step S11: Obtain publicly available small sample object detection datasets from the internet and obtain the criteria for dividing the small sample data; divide the small sample object detection datasets into base class datasets and new class datasets according to the criteria. The base class datasets contain a large number of sample data, while the new class datasets are datasets in the small sample object detection datasets that do not overlap with the categories of the base class datasets. The number of samples in each category of the new class datasets is small. The new class data is used for model fine-tuning in step S4. Step S12: When training the object detection model using only the base class dataset, perform nonlinear mask transformation on the input image to mask 40% of the image. The masking strategy is to divide the original image into m non-overlapping black mask unit blocks, and use the Monte Carlo method to select n small units for masking to achieve masking of the set proportion of the region without changing the true value of the label. Step S13: In order to accelerate model training on the few-shot object detection task, a pre-trained ResNet101 feature extraction network is used to initialize the network weights and parameters to speed up the model convergence.
3. The small-sample target detection method based on low-frequency features and hard-sample modulation strategy according to claim 2, characterized in that, Step S2 specifically includes the following steps: Step S21: The spatial feature map obtained by the feature extraction network is converted into a frequency distribution through discrete Fourier transform; when the input feature map is distributed in the frequency domain, it is passed through a Gaussian low-pass filter to filter out the high-frequency information of the output; finally, the output feature map is obtained through inverse discrete Fourier transform. Step S22: The digital low-pass filter uses a core as... A Gaussian low-pass filter; to reduce computation, the Gaussian low-pass filter is transformed from the frequency domain to the spatial domain; digital spatial Gaussian low-pass filter. The function is defined as follows: in, , Indicates the input space, Represents a possible set of tags; Step S23: After extracting the depth features, the depth features are converted into low-frequency features to extract low-frequency information contained in the feature map; the specific process is as follows: in, It is a linear classification layer The parameters, It is a feature extraction network Parameters; and It is a linear classification layer trained on the dataset. and feature extraction network The optimized parameters are used for subsequent training; It is the function used for parameter optimization; It is cross-entropy loss; It is a global average pooling layer; It is a feature map after discrete Fourier transform. It is the true value corresponding to the feature map after the discrete Fourier transform; It is a low-frequency module, that is, a module that performs discrete Fourier transform and Gaussian low-pass filter.
Citation Information
Patent Citations
Small sample target detection method based on self-supervised contrast constraint
CN114841257A
Small sample remote sensing image target detection method and system
CN115100532A